4 ms·
The problem with things like this is that "compile to C" isn't really just done for ease of implementation, but for sheer portability - individual C compilers a
by mhd 4y ago
The problem with things like this is that "compile to C" isn't really just done for ease of implementation, but for sheer portability - individual C compilers are widespread, and the totality of them are basically ubiquitous. The Quick C-- compiler mentioned in the article only supported x86.
So the only way I would see something like this work, is as a frontend for an existing compiler. LLVM itself makes this kinda superfluous there, so that leaves gcc?
- deleted 4y ago[deleted]
- unhammer 4y agohttps://takenobu-hs.github.io/downloads/haskell_ghc_illustrated.pdf#page=8 https://takenobu-hs.github.io/downloads/haskell_ghc_illustra... shows how it (well, the Cmm fork) is used to compile Haskell code with GHC
- mhd 4y agoGHCs Cmm is an interesting beast. It changed a bit from C-- and it doesn't seem to be "sold" outside of the Haskell market, but it does feature basically the best of all worlds: A native generator targeting most current platforms, a LLVM backend (resulting in basically the same platforms, but maybe with different performance characteristics), and even a compile-to-C option.