Coolest D features
Bill Baxter
dnewsgroup at billbaxter.com
Tue Dec 26 11:56:23 PST 2006
Andrei Alexandrescu (See Website For Email) wrote:
> 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'd have to say the #1 thing that makes D great is the combination
native code speed with the ease of development offered by built-in
garbage collection. After that come niceties like nested functions and
class delegates. And if you're into templates then D's templates are
very nice and enable a lot of nifty things that are difficult to do in
C++ -- (static if! variadic templates & tuples!). The lack of need for
header files is another plus. It gets very tiring having to type every
function signature twice in C++.
There are lots of other little minor things that make D nicer to use
than C/C++ and other alternatives (I put built-in arrays in this
category), but to me those aren't the biggies.
The ability to call C code without a lot of messy JNI-like boilerplate
code is also a big deal.
I wholeheartedly agree with Waldemar, though, that the things that are
going to sway C/C++ folks are different from what's going to sway
Java/C# folks. D's library and development tools are still rather
anemic, so most likely that would send most Java/C# folks running. On
the other hand, if they find they need to deliver an app that works
stand-alone, independent of a 100MB runtime environment, or one which
runs at native speed, then D is probably the closest thing they're going
to find to their beloved Java/C# that can do the job.
--bb
More information about the Digitalmars-d
mailing list