Official DMD compiler written in D

Nicolas Sicard dransic at gmail.com
Tue Jan 8 16:29:25 PST 2013


On Tuesday, 8 January 2013 at 21:57:17 UTC, H. S. Teoh wrote:
> On Tue, Jan 08, 2013 at 07:48:58PM +0100, Tim Krimm wrote:
>> 
>> Now that D 2.0 is fairly stable, are there any plans of 
>> writing the
>> official DMD compiler with the D 2.0 language vs the present
>> language of C++?
>> 
>> DMD 2.0 would have to be feature frozen and then DMD 3.0 could 
>> be
>> written with the previous DMD 2.0 compiler.
>> 
>> What are your thoughts?
>
> Philosophically, I like this idea. D should eat its own dogfood 
> to prove
> its own worth. :)
>
> However, having the D compiler itself written in D, means we 
> will have
> trouble bootstrapping it on new platforms. The advantage of 
> having a C++
> implementation is that C/C++ compilers are almost the first 
> thing that
> gets implemented on a new platform, so you can almost always 
> count on
> their existence. So you can just compile DMD and away you go.
>
> We *could* write a cross-compiler, of course, but it still 
> requires that
> you first target the D compiler (written in D) to the new 
> platform, and
> then cross-compile itself to that platform.  Whereas with DMD, 
> you just
> use the target platform's C++ compiler and you're up and 
> running.
>
>
> T

I think the OP implied that we could build DMD2 from its C++ 
source on any platform and then DMD3 from its D source with DMD2.


More information about the Digitalmars-d mailing list