Migrating dmd to D?

Walter Bright newshound2 at digitalmars.com
Wed Feb 27 19:49:27 PST 2013


On 2/27/2013 6:12 PM, Ary Borenszweig wrote:
> Why? What happened?

There's a lot of lore in the original code involving arcana about how things 
really work. If you refactor and translate at the same time, you don't have an 
incremental conversion you can run through the test suite at each step.

You wind up with one very large step change, and it doesn't work, and you're lost.

Another reason is the people doing the translation/refactoring have an 
inadequate grasp of why the code is the way it is, so they just wind up breaking 
it. The resulting frustration and finger-pointing ruins everything.

Translate. Test. Verify. *THEN* refactor. Because when the verify step fails, 
and you have a one:one correspondence to the original code that does work, you 
can quickly find out what went wrong. And believe me, things go wrong in the 
translation at every step of the process.


> If you don't use all D features and plan the compiler for being written in D I
> don't think the compiler will be a good candidate for stress-testing the language.

The point is not to use the compiler to stress test the language. NOT AT ALL. 
The point is to improve the compiler by taking advantage of what D offers.


> It's also more fun to do it from scratch. What's the hurry?

We have limited resources, and we shouldn't squander them on something I have a 
lot of experience on knowing will fail.

Hey, anyone can ignore me and go ahead and do it that way. I wish you the best 
of luck - sometimes us old coots are dead wrong - but forgive me if I'm not 
going to be terribly sympathetic if you ignore my advice and things go badly!



More information about the Digitalmars-d mailing list