On Friday, 28 November 2014 at 19:59:40 UTC, Xinok wrote:
Given that we have GDC with the GCC backend and LDC with the
LLVM backend, what are the benefits of keeping the DMD compiler
backend? It seems to me that GCC and LLVM are far more
developed and better supported by their respective communities.
They have superior optimizers and are better equipped for
migrating D to new platforms. On the other hand, from what I
gather, there's lots of work to be done on DMD on improving
support for x64 Windows and ARM.
It's a genuine question, which is why I posted this to D.learn.
I don't follow development on the backend and overall I'm
unfamiliar with compilers, so I'm not sure what the benefits
are of the D community continuing to maintain it's own backend.
As others have said already, the reasons why I use dmd are:
1. short compilation times which is important when coding both
big projects and little test programs (i.e. fast prototyping).
Nothing more annoying than having to wait for "ages" after you've
made a few minor changes to your code.
From a PR point of view, this is important, because it gives D an
advantage over other compiled languages and defeats the argument
that scripting languages like Python don't have long compilation
times.
2. dmd works out of the box on all supported OSes. You download
it and are basically ready to go. GDC and LDC require a bit more
work in this respect, especially on Windows (which can be a deal
breaker for newcomers who are curious about the language).
As for the speed, I think that dmd is not too bad in most cases.
I have a project I wanted to compile with LDC or GDC for the
release build, but didn't, because the dmd version is already
very responsive. So I decided to leave well enough alone (at
least for now).
The thing about ARM is admittedly a chagrin in the behind. But
what can you do.