Thread overview
which version of D for beginers?
Nov 22, 2008
Fei
Nov 22, 2008
Lutger
Nov 22, 2008
Hoenir
Nov 22, 2008
Gide Nwawudu
Nov 23, 2008
Kagamin
Nov 24, 2008
Christopher Wright
Nov 22, 2008
Janderson
Nov 26, 2008
Daniel de Kok
November 22, 2008
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.
November 22, 2008
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.
November 22, 2008
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
November 22, 2008
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?
November 22, 2008
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
November 23, 2008
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.
November 24, 2008
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?
November 26, 2008
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