3 ms·
The alternative is to sit down and design a new language for this task, rather than to try to force C to be that language, which is a task that it is successful
by jcranmer 8y ago
The alternative is to sit down and design a new language for this task, rather than to try to force C to be that language, which is a task that it is successful enough sufficiently often to be touted as the solution and fails at sufficiently often for people to complain that it fails.
The problem is that almost no one needs a portable assembler, and even those who want it very often only want it for very small snippets of code. If you want to specify something very exactly that is legal only because of the particulars of your machine, then use assembly. There are certainly a few things that compilers could expose that are poorly exposed in most languages (floating point environment, various flag bit manipulation including checked overflow and add-with-carry, vector instructions, synchronization barriers, underaligned types). But you don't need portable assembly for those things, just better compilers.
- userbinator 8y agorather than to try to force C to be that language Ironic, considering that C was specifically designed for that from the beginning.
- pjmlp 8y agoOn the context of PDP-11 class hardware. C isn't the first portable systems programming language, it just became ubiquitous thanks to UNIX.