Re:DigitalMars C/C++ Compiler
by loup-vaillant on Wednesday May 23, 2018 @11:57AM
(#17135167)
> Basically, writing a C++ front end takes 10 man years.
This is insane. No language needs to be that complex. I guess that's the power of backward compatibility: forcing an entire industry to dig itself into an ever growing hole, because in the short term we move faster by digging than by first clawing our way out.
Re:DigitalMars C/C++ Compiler
by WalterBright on Wednesday May 23, 2018 @03:43PM
(#17137485)
Mastering C++ takes about 10 years, too :-)
(Yes, you can be productive in C++ in much less time.)
Yes, it's been oddly satisfying.
> May it have been better to start from scratch?
Ah, the age old question. I can guarantee, though, the answer is no. It took me maybe a couple weeks to convert the entire front end from C++ to D. Contrast that with the Warp preprocessor I wrote for Facebook, which took many months, and I knew what I was doing. And that is just the preprocessor!
Basically, writing a C++ front end takes 10 man years. I know of no effort that took less time, and this is assuming the best in the business doing the writing.
> Was the "D as a better C" approach inspired by your want to transition DMC to D?
Partially, yes. And certainly doing the transition work has improved betterC. Nothing like proving it works than translating a crotchety old horrifyingly complex piece of code written in 1980's style.
I plan on doing this to all my old projects that are still in use.