Better HN
topnewbestaskshowjobs
Log inSign up

wabstractions

1 karma · joined Apr 19, 2026 (7mo ago) · 5 submissions

Software engineer from Hungary. Interested in how structure and abstraction shape systems. Currently working on FPGA-related projects and a document model called Text2Doc.
Submissions

comment 7mo ago · link · parent

Calling Wasm a stack machine is misleading.

It’s closer to a structured IR that uses a stack encoding, not a machine where the stack is the primary state. The absence of real stack operations (dup, swap, etc.) is not accidental — it shows the stack isn’t meant to be observable.

If you build even a tiny real stack CPU (simulator + assembler + traces), the difference becomes obvious very quickly: the stack stops being syntax and starts being semantics.

So the real question isn’t “is Wasm a stack machine?” but “why does it avoid being one?”

My take: because it’s designed for validation and compilation, not execution as a first-class machine model.

And that’s fine — but then we should call it what it is.