Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I wouldn't consider D2 to be production ready yet, but it's getting close. The language definition is fairly stable. Very few breaking changes should be happening at this point (though some additive changes intended to iron out key issues in the language may occur). Development on the compiler is moving forward very quickly, and a lot of bugs are getting fixed. But at this point, if you use D2 heavily, you <em>will</em> run into compiler bugs, particularly if you use newer language features. And not all of those features have been fully implemented yet (e.g. <code>alias this</code> and <code>inout</code>), so while <a href="http://rads.stackoverflow.com/amzn/click/0321635361" rel="noreferrer">TDPL</a> is mostly correct, dmd is still somewhat behind it.</p> <p>Also, while the standard library, Phobos, is very good overall and much of it is stable, it's still very much a work in progress. We're trying to avoid causing immediate breaking changes by putting stuff that we're removing through the proper deprecation path (generally 6 months as scheduled for deprecation and 6 months as deprecated before complete removal), but sometimes immediate breaking changes <em>do</em> occur (and sometimes the compiler causes breaking changes as it's worked on). In some cases, entire modules are going to be overhauled (e.g. std.xml and std.stream). Possibly the biggest annoyance in that regard is std.container, which is fairly new, doesn't have a whole lot in it yet, and could have a significant redesign as Andrei Alexandrescu sorts out how we're going to deal with memory management in it. So, container support is improving but generally lacking. All in all, a lot of Phobos is fairly stable, but it's definitely not set in stone.</p> <p>There is definitely support for both dmd and Phobos in that if you post things to <a href="http://d.puremagic.com/issues" rel="noreferrer">bugzilla</a> or discuss them on <a href="http://digitalmars.com/NewsGroup.html" rel="noreferrer">the newsgroup</a>, people will generally be quite helpful and devs will try and fix bugs in a timely manner, but most of the people working on it do so in their free time, so sometimes it can take a while. The switch to <a href="https://github.com/D-Programming-Language" rel="noreferrer">github</a> has definitely improved matters though. I know that <a href="http://digitalmars.com/" rel="noreferrer">Digital Mars</a> provides additional support for dmc if you pay for it, but I don't know if they'll do the same for dmd. I expect that there's a good chance that they will though (certainly, if they don't now, I would expect them to do so in the future).</p> <p>As for the quality of the compiler, dmd uses Digital Mars' dmc as its backend, and dmc is the newest incarnation of the first C++ compiler to compile code natively (as opposed to translating it to C first), and Walter Bright, the creator of D, has been working on it ever since he created it. He's one of the best compiler writers out there and has created a number of optimizations which have become standard in C++ compilers (such as <a href="http://en.wikipedia.org/wiki/Return_value_optimization" rel="noreferrer">Return Value Optimization</a>), but dmc doesn't have a lot of people working on it, and there are some areas in which it has fallen behind (such as floating point optimizations), and D is new enough that there's a lot of work to be done in optimizing it. As the bugs are fixed, I'm sure that more focus will eventually shift towards optimizing the language, and it will eventually be on par with C++ in most circumstances (and better in some), but right now it really depends on your code. Sometimes D is on par; sometimes it isn't.</p> <p>Some people <em>do</em> use D2 in production code (in particular, I know that Adam D. Ruppe uses it for web development with the companies that he works with - he's a frequent poster on the D newsgroup), but I don't think that there are very many of them, and they generally avoid the newer, fancier features of the language (which is generally where the worst bugs are). How stable it's going to be is really going to depend on what you do with the language.</p> <p><a href="http://www.prowiki.org/wiki4d/wiki.cgi?LanguageDevel" rel="noreferrer">The wiki</a> has some good information on the work remaining to be done, and <a href="http://www.digitalmars.com/d/archives/digitalmars/D/What_remains_to_be_done_for_D2_138480.html" rel="noreferrer">this recent thread</a> on the newsgroup has some good info as well.</p> <p>D is definitely approaching the point where I would consider it production ready, but there's definitely some risk at this point. It's <em>great</em> for hobby stuff, but if your livelihood depends on it, I don't know if the risk is worth it quite yet. It's getting close though. It's probably worth your time to look into it, try it out, experiment with it, etc. But I wouldn't just dive in with your production code and convert it all to D. It might work out great, but it might not. I expect that a year from now, I'll be able to say that D2 is production ready, but I don't know how much sooner than that I'll feel comfortable in saying so.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload