Migrating dmd to D?

SomeDude lovelydear at mailmetrash.com
Fri Mar 1 23:05:05 PST 2013


On Thursday, 28 February 2013 at 21:11:20 UTC, js.mdnq wrote:
> I believe a complete rewrite from the ground up using a fixed 
> stable dmd is needed. The reason is two fold: Many things have 
> been learned about the evolution of the D language over time. 
> Much of the trouble of D has been stabling the D implementation 
> and spec. Second, Trying to port the C++ code to D to make a D 
> compiler will only multiply the bugs in DMD. (i.e., it will 
> introduce new bugs from the conversion and retain the old bugs)
>
> Instead, I believe proper project management is needed along 
> with a SOLID language specification and clear delineation of 
> goals. If the language spec itself is flawed then the same 
> things will occur as is with DMD.
>
> To tie the dependence on C/C++ the D compiler would need to be 
> written in the language subset of the intersection between DMD 
> and the new language spec. This should not be hard to do but 
> must be strictly maintained. Else one will always require dmd 
> to compile the compiler.
>
> Hence, a solid language spec for the new D compiler is needed. 
> The language spec must overlap with the old spec and the D 
> compiler must only be written in this overlap. (It should be 
> obvious but this allows the D compiler to be compiled in DMD or 
> itself, after the bootstrap one can gradually evolve the subset 
> to include the newer features a few versions behind since the 
> old dmd is not needed)
>
> The problem with such an undertaking behind successful is all 
> in the project management. I would say we need a solid language 
> spec and the subset between it and the current spec(frozen at 
> some point). I imagine they would be almost identical so 
> actually little real work would be needed.
>
> So, who's up for writing the D 3.0 spec?

I believe this is the better strategy. At least, we have a 
reference compiler, so that it's easy to know at each point in 
time if the new compiler is at least as good as the old one. 
However, it's such a long road that all these efforts will mean 
the development of the current compilers are nearly completely 
stopped, which is problemaic, given that important features are 
still missing.

So the question now is, what exactly which features can a rewrite 
in D make it easier to add ?


More information about the Digitalmars-d mailing list