D vs C++11

Nick Sabalausky SeeWebsiteToContactMe at semitwist.com
Sat Nov 3 16:01:38 PDT 2012


On Sat, 03 Nov 2012 23:01:19 +0100
"Malte Skarupke" <malteskarupke at web.de> wrote:

> On Friday, 2 November 2012 at 17:03:38 UTC, Erèbe wrote:
> > Hello student here,
> >
> > I have started to learn D a few months ago with Andrei's book 
> > (I really liked arguments about design decisions), but as the 
> > same time I was learning new features of C++11, and now I'm 
> > really confused. (As learning projects, I've done an IRC Bot in 
> > D and an IPv6 stack in C++11)
> >
> > D is a great language and introduce a lot of features I really 
> > like (range, property, UFCS, great metaprogramming, ...) but 
> > C++11 and the new standard librairy are well supported now.
> >
> > I have some solid experience with C++, so I know how cumbersome 
> > C++ could be (C++11 and universal reference ?), but D has a lot 
> > of features too and (as C++) a slow learning curve.
> >
> > I would like to konw the point of view of the community about 
> > C++11 in regard of D ? Is the gap between D and C++11 is 
> > getting thinner ? Do you think D will keep attracting people 
> > while at the same time C++11 has more support (debugger, IDE, 
> > Librairies, Documentation) ?
> 
> I've learned C++ in the last two years and learned D in the last 
> couple months, and I slightly prefer C++ over D. When I started 
> using C++11, I took for granted that all the features just work. 
> Using D, I realize that that is actually unusual. In D you still 
> encounter compiler bugs or inconsistent behavior way too often, 
> and I have workarounds all over my code.
[...]
> D also makes the const keyword more annoying than it should be. 
> In C++ you typically use it as an indicator for the intent of the 
> interface and to prevent you from making mistakes. There are some 
> programmers who find it very annoying and who never use const. In 
> D I am leaning towards being one of those programmers, even 
> though I belong to the group who uses const more strictly in C++.
> 

Bringing things back to another branch of this thread: What you say
here is a big part of the reason our core devs aren't focused on IDE
sorts of things right now. Because this core stuff needs to come first.

That said, my experience with the current state of D seems to be better
than yours, unfortunately. But maybe that's because I was using D five
or so years ago (and mostly gave up on C++ close to 10 years ago) and
so the thing I see most is the improvement since then (plus, of course,
I've become more accustomed to dealing with the issues when they do pop
up).

You do raise some fair points. *Personally* I find dealing with D's
occasional hiccups to be much more than totally compensated for by D's benefits. But YMMV, of course.



More information about the Digitalmars-d mailing list