Hardware Stockholm Syndrome
5 hours ago
- #programming-paradigms
- #historical-context
- #hardware-optimization
- Modern CPUs are optimized for C's function-based paradigm, making synchronous function calls efficient through dedicated hardware.
- The function-based paradigm became dominant not due to inherent computational truth but because it won and reshaped hardware accordingly.
- Early CPUs required manual stack and parameter management; C standardized calling conventions, initially adding overhead.
- Hardware evolved to reduce function call overhead, embedding C's paradigm into silicon, reinforcing its dominance.
- Preemptive multitasking emerged to manage synchronous function chains on single CPUs, adding context-switching overhead.
- Hardware improvements (faster context switches, better caches) made C appear naturally efficient, creating a self-reinforcing cycle.
- The 1972 economic context (expensive CPUs, time-sharing) favored synchronous, sequential execution, making C's paradigm rational.
- Alternatives like Pong's parallel hardware logic existed but were sidelined in favor of function-based computing.
- Today's cheap, abundant CPUs and networks challenge the function-based paradigm, yet it persists due to legacy optimizations.
- A first-principles reset is needed: atomic units should reflect modern realities (async, message-passing, parallelism).
- The function-based paradigm is a historical choice, not destiny; questioning it could unlock better abstractions for today's needs.