Everything Is Not a Function (And Your CPU Knows It)
2026-02-03
We’ve spent fifty years pretending that everything in programming is—or should be—a function. It’s time to question that assumption.
The Hidden Tax
Your CPU doesn’t actually support functions. It supports subroutines—simple jump-to-address-and-return operations. What we call “functions” are PVR subroutines: Parameterized Value Returning constructs that require additional machinery:
Calling conventions for parameter passing
Stack frame setup and teardown
Return value extraction
Register management
We’ve gotten remarkably good at optimizing this machinery. Modern hardware has evolved specifically to make function calls fast. But here’s the uncomfortable truth: we’re paying for this abstraction in both code and cognition.
The Fifty-Year Grief
Simply thinking that everything must be a function has led us into a maze of problems:
Callback hell in JavaScript
The Mars Pathfinder priority inversion failure
Bandaid solutions like .then() and async/await
SIMT (Single Instruction, Multiple Threads) complexity in GPU programming
Clumsy stack-unwinding implementations of tail call optimization in WebAssembly
The need for attributes like bare in Zig to escape function overhead
Each is a symptom of forcing the wrong abstraction onto problems that aren’t inherently synchronous and sequential.
A Glimpse Through Different Windows
Forth doesn’t solve everything, but it does something valuable: it reminds us we have choices. It’s a small, necessary step toward thinking beyond “everything is a function.”
Functional Programming has its place—it excels at synchronous, sequential transformations. But it’s unsuitable for problems that don’t naturally fit that pattern.
Prolog does something completely different from either FP or Forth, offering yet another lens.
The Epicycle Problem
When you pick one paradigm and try to force every problem through it, you end up with epicycles—the complex, ad-hoc workarounds that accumulate when your model doesn’t match reality.
The ancient astronomers added epicycles to preserve their geocentric model. We add layers of abstraction to preserve our function-centric model.
Maybe it’s time to admit: the universe doesn’t revolve around functions.
What would change if we stopped assuming everything must be a function? What other programming models should we be exploring?
See Also
Email: ptcomputingsimplicity@gmail.com
Substack: paultarvydas.substack.com
Videos: https://www.youtube.com/@programmingsimplicity2980
Discord: https://discord.gg/65YZUh6Jpq
Leanpub: [WIP] https://leanpub.com/u/paul-tarvydas
Twitter: @paul_tarvydas
Bluesky: @paultarvydas.bsky.social
Mastodon: @paultarvydas
(earlier) Blog: guitarvydas.github.io
References: https://guitarvydas.github.io/2024/01/06/References.html

