HACKER Q&A
📣 sebastianconcpt

What assembler abstractions are better than C?


I once hear C described as an “assembly language abstraction”.

Along the years, the computing industry came up with many elegant languages but among them, what other attempts to “abstracting assembler” are out there?


  👤 johndoe0815 Accepted Answer ✓
Plan 9 and Inferno (and, based on their compiler toolchain, also Golang) use a form of an abstract assembler/intermediate representation which delegates actual code generation and optimization to the linker.

More information on this can be found at https://9p.io/sys/doc/asm.html (for Plan 9 and Inferno) and https://go.dev/doc/asm (for Go).


👤 wruza
What dou you mean by better than C? A different paradigm or a better implementation? In which regard?

Lisp/scheme are different paradigms, but are they even “abstractions over assembly”? D is closer to C, but does it really abstract from assembly in a better way, or in just the same? FASM is heavy macroed self-building assembler, but is it an abstraction or just a codegen toolkit? The question seems like too broad.


👤 PaulHoule
In assembly language you can bypass C's calling convention and stop, for instance, moving the stack pointer around every time you call a subroutine.