Official compiler

David Nadlinger via Digitalmars-d digitalmars-d at puremagic.com
Thu Feb 25 09:57:49 PST 2016


On Thursday, 25 February 2016 at 02:58:08 UTC, Walter Bright 
wrote:
> A big chunk of that was getting D to catch C++ exceptions. And 
> before I did this work, neither GDC nor LDC did, either. It's 
> not a simple matter of just turning it on given Dwarf EH.

That's beside the point, the C++ interop needed to be worked out 
either way and is not specific to the DMD backend. In that stupid 
example I gave, I was referring to the DWARF EH implementation 
itself, which will have taken you a non-negligible amount of time 
due to all the barely documented details, unless you are even 
more of a super-human compiler implementation expert than I 
already know you are. ;)

Don't get me wrong, I couldn't care less about the details of how 
long it took whom to implement C++ EH interop (or the fact that 
it did exist before in LDC/Calypso, and in the form of prototypes 
for vanilla GDC/LDC, etc.).

I'm only playing devil's advocate because many people here make 
it seem as if there was no cost to supporting multiple compilers, 
while there most definitely is. This ranges from the blatant 
duplication of work over PR issues to the fact that big 
language/compiler features are all but impossible to implement 
for anybody but you, since you are the only one who knows how to 
implement them on DMD (and in the current situation, not having 
them available in DMD would be a deal-breaker).

Sure, the fact that you know all the nitty-gritty details of one 
backend might make implementing certain changes easier for you, 
as you pointed out. But the fact that this one backend is obscure 
compared to the usual suspects, poorly documented and 
license-encumbered pretty much ensures that you will remain the 
only person to tackle such projects in the future.

  — David




More information about the Digitalmars-d mailing list