Hacker News new | past | comments | ask | show | jobs | submit login

I'll bite: a relevant technical question would be: is D really that much better than C++11 that you should abandon C++ (with all of the consequences that would have on tooling/libraries/etc.)?

I think D made more sense pre-C++11.




That is an excellent question. There is really a lot of cross-bleed between C++11 and D. In fact if not for anything else D was good competition to wake the C++ giant up into doing something about its deficiencies and backport as many D features as possible. I think this will continue to happen and and I think both the languages will benefit technically from this dynamics.

As for, should one abandon and existing C++ project and rewrite in D. Probably a bad idea, such a thing would require strong arguments. On the other hand for some project that is beginning now, I would say its evenly matched. The possibility of abandoning a lot of the C++ cruft and legacy is not something that should be ignored. Whether that compensates for the reduced maturity of tooling as compared to C++ has to be decided on a case by case basis, and this question is going to be a perennial question that would afflict the adoption of any new language. Its hard to have authoritative answers for this. That said I am looking forward to some improvements in D, better garbage collection, better separation of functions in the std library that uses garbage collection, getting the runtime memory requirements down for compiling D code that uses a lot of CTFE, and well if you could add sum types and pattern matching and efficient fibres/coroutines that would be very nice. I think fibres would be a tough one if one has to maintain portability and compatibility with C libraries.


Having used both, I'd say yes. C++11 does some wonderful things, many many improvements that were a long time coming, but D put those improvements into the core language and their standard library. This makes D much more readable and hackable than C++11. Not to mention the metaprogramming support is significantly easier to use (though not more powerful, as they're both technically turing complete).


D's metaprogramming is significantly more powerful. For example, string literals can be template arguments and can be manipulated at compile time and turned back into D code.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: