4 ms·
> C is a heavyweight intermediary language which brings with it a /lot/ of baggage. There's no valid direct technical reason other than financial resource const
by azakai 13y ago
> C is a heavyweight intermediary language which brings with it a /lot/ of baggage. There's no valid direct technical reason other than financial resource constraints to justify compiling to C (... or JS, for that matter) instead of a more suitable and expressive IR/bytecode.
1. In theory. But what is that "more suitable and expressive IR/bytecode"? I would argue such a bytecode should be portable, but LLVM IR is not that.
2. There are lots of reasons to target C. C can be compiled by many compilers, while LLVM IR can only be compiled by LLVM to things LLVM can compile to. For example, game consoles, various new embedded platforms, etc. - they all have C compilers, but LLVM might not support them (and possibly cannot support them).
- pbsdp 13y ago> 2. There are lots of reasons to target C. C can be compiled by many compilers, while LLVM IR can only be compiled by LLVM to things LLVM can compile to. For example, game consoles, various new embedded platforms, etc. - they all have C compilers, but LLVM might not support them (and possibly cannot support them). Is the point to produce something optimal for users, or produce something optimal for developers? Most successful game and application platforms trend towards the former, whereas your work on web technologies trends towards the latter.
- eliben 13y agoIt's not difficult to restrict LLVM IR to a portable subset, though ;-)
- foobarbazqux 13y agoAll of your arguments about going through C would go away if you had enough money to build your own ideal toolchain, including the development of your own IR for your language.
- azakai 13y agoIn theory. But it would be my own ideal toolchain. Someone else might make different tradeoffs in its design.
- foobarbazqux 13y agoI'm not sure I understand. The claim is that the only reason to target C is to save money.