On Saturday 18 December 2010 01:14:19 Gour wrote: > Hello, > > Seeing all the threads here about improving D(2) syntax for different > features of the language, I just wonder if it's possible to learn D(2) > language which is so much in flux by using TDPL as reference? > > Now I may have some time to learn D(2), but wonder when will the > language become more stable or the proposals/improvements discussed > here (I skip over majority of such threads) are not major changes?
TDPL is mostly correct. There are a few features that it discusses that either quite buggy or outright unimplemented (e.g. neither inout and alias this is completely implemented and some of what is implemented is rather buggy). There are also some features which may change. However, at this point, stuff is only going to change with a really good reason, and most of such changes are likely to be additive and wouldn't break much - if anything. For instance, weak purity is essentially an additive change. It makes it so that more functions can be marked as pure, but it doesn't make more functions optimizable due to purity, and it doesn't break any code. Prior to the release of TDPL, there were at times major changes between releases of dmd which broke a lot of code. That doesn't really happen anymore. For the most part, if you follow TDPL, you will be fine. Some stuff in TDPL won't work yet in practice, and it is possible that a few changes will be made to the language at some point which break current code and/or contradict TDPL. But no such changes have yet been made, I don't believe, and there are none which have been decided upon. None will be made without a definite, compelling reason, precisely because TDPL is supposed to be valid. D2 is not entirely stable, but it the spec is no longer in constant flux either. Some changes likely will happen, but only as necessary, and they're going to be rare. And as time passes, they will become even rarer. Some folks will continue to discuss possible features for D which will never make it into D2. If there is ever a D3, they may be included then, but stuff like non-nullable references is not going to make it into the language in D2 (though there may be a library solution for it). Now, Phobos is certainly in flux. Parts of it are quite stable and won't be changing particularly, but there's plenty of it which will continue to evolve, and there will certainly be more stuff being added. Phobos is still very much a work in progress. Really, the biggest obstacle to D development at this point is likely simply bugs - be they in the compiler or in Phobos. The situation continues to improve, but there are bugs which pop up from time to time which can cause major headaches (like inout being totally broken at the moment). The language spec is essentially stable, but not necessarily set in stone. In almost all cases, you can rely on TDPL being correct. So, I wouldn't worry too much about that. Compiler bugs are far more likely to trip you up than any language changes. If and when they happen, they'll probably remove certain types of problems rather than causing much in the way of new ones anyway. - Jonathan M Davis
