Re:C as an Intermediate Language (2012)
by ilaksh on Sunday May 15, 2016 @05:26PM
(#11702852)
If you guys are interested in languages that compile to C, the best programming language I know of compiles to C and it is called Nim.
[ Parent
| on HN ]
Re:C as an Intermediate Language (2012)
by felixangell1024 on Sunday May 15, 2016 @05:36PM
(#11702884)
EDIT0:
It appears I was wrong, for some reason I was under the impression DMD produced C code. Ignore this comment! :)
Another language that is widely used by hobbyists and in production is D which, as far as I know, produces C code too.
EDIT: I should say there are a few D compilers, DMD, LDC, and some other one by GNU(?).
I think that DMD is the main compiler, but I could be wrong. LDC generates LLVM code.
There are three compilers for D (DMD, GDC, LDC), but none of them uses C as an intermediary language.
Are you sure? IIRC the main D compiler doesn't generate C.
Why on earth would LDC use C when it has access to LLVM IR?
Edit: A cursory look seems to suggest they do translate to IR: https://github.com/ldc-developers/ldc/tree/master/ir