Coolest D features

Kevin Bealer kevinbealer at
Tue Dec 26 22:06:27 PST 2006

== Quote from Andrei Alexandrescu's article
> Say you wanted to introduce a programmer friend to D. She might know one
> of D's sibling languages (Java, C, C++, or C#), but you shouldn't rely
> too much on that. What features of D would you describe first to hook
> that friend in?
> Andrei

I've tried introducing D to people, and response varies.  For people that see
C++ as having no advantages over C, it's probably an impossible sell.  For
people that like C++ but have been working with it long enough to be annoyed at
the syntax, the cleaner syntax (especially for template metaprogramming) have
made an impression.

The real selling point for me is that it has basically all of the safety and
simplicity of use of something like Java, but does not have the handcuff and
straight jacket feeling.  The "we are all in this boat and we will all follow
the rules" approach of Java, along with some of the more arbitrary missing
features (i.e. unsigned types) causes the language to drag when working with
high-performance and high-requirement (i.e. number crunching and hardware
oriented) fields.

The starting point I use is that it has almost all the features and power of
Java and C++ but is cleaner and more usable than Java.  If they are still
interested I point them here (,
since I think it's a good jumping off point for a C++ or Java programmer.

There was something about a web server that doesn't need to allocate
memory to process requests - I can't find a link for this, but I use
it to describe the power of array slicing.

I think these are the most impressive "Why D" type pages: (esp. if they know lisp)

And if they don't know anything about GC:

For C++, the formula is, find out what they are working on, and show how
it can be done much more simply in D.  If they are Java programmers, find
out what they are working on, and show how much faster it is in D.


More information about the Digitalmars-d mailing list