An example of Clang error messages

bearophile bearophileHUGS at lycos.com
Thu Mar 4 17:10:30 PST 2010


Walter Bright:
> But there's little reason to implement a D compiler from scratch.<

I'm ignorant about this topic, but I think there are various ways to create a new D front-end:
- Copy the C++ code of DMD and create a small middle-end to adapt it to something else, LDC and GDC have done this. This is the faster way to produce something that works.
- Translate the dmd front-end to D code that looks as much as possible as the original C++. And when it works well, then it can slowly be adapted to use D features, etc. The advantage of this way is that you then can program in D instead of C++, and later people that want to help in the development of this don't need to know C++ too. Another advantage is that such good amount of D code can give ideas to improve D itself. I think someone has tried to do this, but I think there's no working compiler yet (maybe DIL?).
- Create a front-end in D almost from scratch. Maybe Dlang is trying to become this. The advantage is that it's modelled on Clang, that has a nice modular design.

Bye,
bearophile



More information about the Digitalmars-d mailing list