Official compiler

Jonathan M Davis via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 18 03:12:57 PST 2016


On Thursday, 18 February 2016 at 06:57:01 UTC, Kai Nacke wrote:
> even if DMD is the official reference compiler, the download 
> page http://dlang.org/download.html already mentions "strong 
> optimization" as pro of GDC/LDC vs. "very fast compilation 
> speeds" as pro of DMD.
>
> If we would make GDC or LDC the official compiler then the next 
> question which pops up is about compilation speed....

Yeah. dmd's compilation speed has been a huge win for us and 
tends to make a very good first impression. And as far as 
development goes, fast compilation speed matters a lot more than 
fast binaries. So, assuming that they're compatible enough (which 
ideally they are but aren't always), I would argue that the best 
approach would be to use dmd to develop your code and then use 
gdc or ldc to build the production binary. We benefit by having 
all of these compilers, and I seriously question that changing 
which one is the "official" one is going to help any. It just 
shifts which set of complaints we get.

Regardless, dmd's backend was written by Walter and is the one 
he's worked on for something like 25 years. I would be shocked if 
he were to switch to something else now. And actually, he'd risk 
legal problems if he did, because he doesn't want anyone to be 
able to accuse him of taking code from gcc or llvm. Yes, dmc/dmd 
has failed to keep up with gcc/gdc and llvm/ldc in terms of 
optimizations, because there are far fewer people working on it, 
but it compiles way faster than they do. There are advantages to 
each, and as long as that's clear, and we treat gdc and ldc as 
least semi-official, I think that we're fine. If anything, the 
problem is probably that the gdc and ldc folks could use more 
help, but dmd and Phobos suffer from that problem on some level 
as well, albeit probably not as acutely.

- Jonathan M Davis


More information about the Digitalmars-d mailing list