|
|
|
|
|
by PeCaN
3599 days ago
|
|
I knew someone would bring this up.¹ GCC is an optimizing compiler, at which point all bets are off for obvious/trivial translation between C and asm. You could, hypothetically, write a optimizing TypeScript compiler that emits asm.js. However, while you can reasonably argue C started as a portable assembly, significant differences like a type system, pointer arithmetic, a calling convention, etc, exist now. I don't think it's unreasonable to say C is significantly higher-level than assembly. 1. My parenthetical at the end was anticipating this—then again, the translation between C and asm frequently is easy, albeit tedious. |
|
And in the other direction one could argue that those so-called "transpilers" actually compile from a higher-level language when you consider complex type-inference and static type checking. Optimizing is not all a compiler does.