Hacker News new | ask | show | jobs
by felixangell1024 3693 days ago
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.

3 comments

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