Developing a plan for D2.0: Getting everything on the table
bearophile
bearophileHUGS at lycos.com
Tue Jul 14 13:37:36 PDT 2009
Robert Clipsham:
>What exactly is it you mean by this?<
I keep saying wrong things every day, so this too can be wrong.
DMD back-end is not bad, it compiles quite quickly, and there are many tests where the binary it produces is a bit faster than the binary produced by LDC.
But LLVM offers many interesting things that are hard to do with DMD's back-end, often such things are already implemented in LLVM (maybe not fully refined yet, but they are working on it) and they are waiting to be used. I'm looking at the linker too, for example with LDC you can do advanced Link-time optimizations, and in future it will probably be able to do even more things (like reducing code bloat produced by templates).
On the other hand few things done by DMD are hard to do with LLVM.
So I think D development/developers have to take a more serious look at LLVM, and to design D2 thinking that LLVM and its qualities may be available. A language like D must not be designed to work on LLVM only; but ignoring what LLVM offers, and limiting the D design just to what is able to do today the DMD backend, is not right.
If D will become widespread, four years from now people will probably use LDC more than DMD, so designing D around the limits of DMD doesn't sound right.
In another post I have listed part of the things offered by LLVM, for example it can compile pieces of code dynamically at runtime, and the compiler can be used as a collection of tools to compile code, etc. Such feature was refused by Walter also because it's hard/long to implement (on DMD). But if it's available then it may be better to think what can be done with LLVM.
Bye,
bearophile
More information about the Digitalmars-d
mailing list