www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - which version of D for beginers?

reply Fei <flyingxu gmail.com> writes:
Hi, 

I'm a new D learner but I'm wondering which version of D is suitable for me.
v1, or v2?

When D 2 is out, it seems to be apparent that I should go directly to v2.
But my intention of using D is to create small desktop application for windows,
which needs GUI library of cource. I checked out that DFL is only support v1
(correct?), so I'm really need your suggestions.

Thanks.
Nov 21 2008
next sibling parent reply Lutger <lutger.blijdestijn gmail.com> writes:
Fei wrote:

 Hi,
 
 I'm a new D learner but I'm wondering which version of D is suitable for
 me. v1, or v2?
 
 When D 2 is out, it seems to be apparent that I should go directly to v2.
 But my intention of using D is to create small desktop application for
 windows, which needs GUI library of cource. I checked out that DFL is only
 support v1 (correct?), so I'm really need your suggestions.
 
 Thanks.
I recommend D1 for the following reasons: - like you said, there are so much more libraries available. - the compiler has fewer bugs, especially when learning a language it can be tricky to notice and workaround bugs in the compiler - D2 is still subject to change, which means new releases can break your code. This is a good thing for the language, but requires extra effort on your part. There are a few changes that need to be done when porting code from D1 to D2. It may be helpful to find out what those are at an early stage and program your applications with these in mind. That will help when D2 is more stabilized and you want to switch in the future. Good luck and enjoy the language.
Nov 22 2008
parent reply Hoenir <mrmocool gmx.de> writes:
Lutger schrieb:
 There are a few changes that need to be done when porting code from D1 to
 D2. It may be helpful to find out what those are at an early stage and
 program your applications with these in mind. That will help when D2 is
 more stabilized and you want to switch in the future.
 
While we're on it, is there such a list anywhere?
Nov 22 2008
next sibling parent Gide Nwawudu <gide btinternet.com> writes:
On Sat, 22 Nov 2008 16:30:39 +0100, Hoenir <mrmocool gmx.de> wrote:

Lutger schrieb:
 There are a few changes that need to be done when porting code from D1 to
 D2. It may be helpful to find out what those are at an early stage and
 program your applications with these in mind. That will help when D2 is
 more stabilized and you want to switch in the future.
 
While we're on it, is there such a list anywhere?
http://www.digitalmars.com/d/2.0/features2.html I think it is slightly out of date as D2 has return by reference and druntime stuff. Gide
Nov 22 2008
prev sibling parent reply Kagamin <spam here.lot> writes:
Hoenir Wrote:

 Lutger schrieb:
 There are a few changes that need to be done when porting code from D1 to
 D2. It may be helpful to find out what those are at an early stage and
 program your applications with these in mind. That will help when D2 is
 more stabilized and you want to switch in the future.
 
While we're on it, is there such a list anywhere?
Major D2 feature is constness, others are minor. So it's a good practice to mark in parameters with in parameter storage class, which means const in D2. And string in D2 is invariant.
Nov 23 2008
parent Christopher Wright <dhasenan gmail.com> writes:
Kagamin wrote:
 Hoenir Wrote:
 
 Lutger schrieb:
 There are a few changes that need to be done when porting code from D1 to
 D2. It may be helpful to find out what those are at an early stage and
 program your applications with these in mind. That will help when D2 is
 more stabilized and you want to switch in the future.
While we're on it, is there such a list anywhere?
Major D2 feature is constness, others are minor. So it's a good practice to mark in parameters with in parameter storage class, which means const in D2. And string in D2 is invariant.
Const is the largest feature that makes porting from d1 to d2 difficult. However, if you're concerned with reflection, for instance, d2 has major advances in that area. Though, speaking of const, has anyone come up with a tool to add 'in' to all function parameters?
Nov 23 2008
prev sibling next sibling parent Janderson <ask me.com> writes:
Fei wrote:
 Hi, 
 
 I'm a new D learner but I'm wondering which version of D is suitable for me.
v1, or v2?
 
 When D 2 is out, it seems to be apparent that I should go directly to v2.
 But my intention of using D is to create small desktop application for
windows, which needs GUI library of cource. I checked out that DFL is only
support v1 (correct?), so I'm really need your suggestions.
 
 Thanks.
D2 is an unstable test branch of D. Its constantly changing with new features. I should say its stable enough to use, its just not finalized. D2 has more cool time saving feature not found in D1. D1 is more stable and is getting more stable. Its features rarely change. Also D1 is a smaller language so it might be easier to learn. Most libs only support D1 and will so for quite some time. So the question you should ask yourself is... do you want to live on the wild side or not? -Joel
Nov 22 2008
prev sibling parent Daniel de Kok <daniel nowhere.nospam> writes:
On Sat, 22 Nov 2008 00:41:24 -0500, Fei wrote:
 I'm a new D learner but I'm wondering which version of D is suitable for
 me. v1, or v2?
For what it is worth: I have also only recently started with D, and chose to learn D2. My primary motivation was the inclusion of std.algorithm in D2. Coming from C++ I wanted something comparable to the generic algorithms in STL, and std.algorithm provides this. The GtkD widget toolkit works with both D1 and D2. -- Daniel
Nov 25 2008