Learning D2 from nearly zero

Don nospam at nospam.com
Thu Apr 30 11:47:17 PDT 2009


Grzegorz Adam Hankiewicz wrote:
> After toying with D1 some years ago I've returned to see D2 and ported 
> it a program I had written in D1. 99% of the time was figuring out why 
> my chars[] suddenly didn't want to work/interface correctly with C 
> library calls.
> 
> After going through some documentation on the web I managed to make it 
> work, but still have the feeling my brain hasn't really reached the 
> "aha!" point about all those freaking char/string/whatever aliases. And 
> the mangling looks seriously ugly.
> 
> Also there are many other changes, like ranges mentioned in the 
> Changelog. What the hell are ranges anyway? After browsing some more I 
> get to 
> http://www.digitalmars.com/d/2.0/statement.html#ForeachRangeStatement 
> and simply think: what does this mean other than the word range is in 
> there? I still don't get a clue.
> 
> My point is, the available documentation is scattered like a 
> fragmentation grenade, and depending on your luck you get "hit" by it, 
> or have to spend a lot of time seeking it.
> 
> I know that there is this "Learn to tango with D" book, but I'm not 
> interested in Tango, plus I guess it applies to D1. Is there any other 
> documentation source explaining D2 without necessary going through D1 
> documentation first?
> 
> I'm thinking of something like Python's "holding hands" tutorial. After 
> a few hours of reading that you basically know pretty much everything 
> there is to it, except for the huge library. It would be great if there 
> was something similar for D2 (so I don't have to go and write it myself!).

The key piece of information which I think you're missing is that D2 
just underwent an earthquake change in the last release. D2.029 is alpha 
1 of Phobos 2.0. It's a major break from D2.028, and has lots of 
ground-breaking stuff. The major concepts are in, but there are many 
bugs, and documentation will take some time. It's really not recommended 
to use it unless you're interested in working on language/library 
development.
I'm sorry that you've chosen such a bad time to return! The situation 
should be much better in a couple of months time.


More information about the Digitalmars-d-learn mailing list