www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Version 1.0 or Version 2.0?

reply Michael Kiermaier <michael.kiermaier gmx.net> writes:
I want to program in D, but I am not sure if I should go with Version 1.0 or
with Version 2.0.

What would you recommend?

Some more specific questions:
Is there a list of the language changes from 1.0 to 2.0?
Are there any plans for a 2.0 gdc (the GNU compiler) frontend?
Jul 05 2007
next sibling parent reply Frits van Bommel <fvbommel REMwOVExCAPSs.nl> writes:
Michael Kiermaier wrote:
 I want to program in D, but I am not sure if I should go with Version 1.0 or
with Version 2.0.
 
 What would you recommend?

Depends on what you want. If you want something to work without code modification 1.0 would be the way to go. For cutting-edge features (see below) go with 2.0, but be aware that this comes at the cost of possibly breaking backwards compatibility in newer versions.
 Some more specific questions:
 Is there a list of the language changes from 1.0 to 2.0?

Currently it's mostly stuff to do with final/const/invariant and the fact that class invariants now need "()" to be added to avoid an ambiguity caused by this. For a complete list (and changes in future versions, once they materialize), compare the changelogs for the 2.0 and 1.0[*] branches (http://www.digitalmars.com/d/changelog.html and http://www.digitalmars.com/d/1.0/changelog.html#new1_017, respectively). For this purpose, you can probably ignore the "Bugs Fixed" sections and focus on "New/Changed Features". [*]: starting at 1.017
 Are there any plans for a 2.0 gdc (the GNU compiler) frontend?

I don't know about this one. It might depend on how much work it'd be, since keeping up with Walter seems to be a lot of work already with just one branch...
Jul 05 2007
parent Michael Kiermaier <michael.kiermaier gmx.net> writes:
Frits van Bommel Wrote:
 What would you recommend?

Depends on what you want. If you want something to work without code modification 1.0 would be the way to go. For cutting-edge features (see below) go with 2.0, but be aware that this comes at the cost of possibly breaking backwards compatibility in newer versions.

Thanks for your answer. Of course I want both: Cutting-edge features AND stability :) But I understand that it is not possible at the moment. So I think I will use 1.0 for now.
 Some more specific questions:
 Is there a list of the language changes from 1.0 to 2.0?

Currently it's mostly stuff to do with final/const/invariant and the fact that class invariants now need "()" to be added to avoid an ambiguity caused by this. For a complete list (and changes in future versions, once they materialize), compare the changelogs for the 2.0 and 1.0[*] branches (http://www.digitalmars.com/d/changelog.html and http://www.digitalmars.com/d/1.0/changelog.html#new1_017, respectively). For this purpose, you can probably ignore the "Bugs Fixed" sections and focus on "New/Changed Features". [*]: starting at 1.017

ok. In my opinion it would make sense to have a seperate list which documents the language changes from 1.0 to 2.0. ~Michael
Jul 06 2007
prev sibling parent reply Don Clugston <dac nospam.com.au> writes:
Michael Kiermaier wrote:
 I want to program in D, but I am not sure if I should go with Version 1.0 or
with Version 2.0.
 
 What would you recommend?

Definitely 1.0. 2.0 doesn't really exist yet. The DMD 2.0 compiler is highly experimental, and only has the first of the new features. Only use it if you want to help contribute to the development of 2.0.
Jul 05 2007
parent Michael Kiermaier <michael.kiermaier gmx.net> writes:
Don Clugston Wrote:

 Michael Kiermaier wrote:
 I want to program in D, but I am not sure if I should go with Version 1.0 or
with Version 2.0.
 
 What would you recommend?

Definitely 1.0. 2.0 doesn't really exist yet. The DMD 2.0 compiler is highly experimental, and only has the first of the new features. Only use it if you want to help contribute to the development of 2.0.

Thank you for this clear statement. I did not know about the exact status of 2.0. So I will use 1.0.
Jul 06 2007