Is D appropriate for creating a stable production app?
Jarrett Billingsley
kb3ctd2 at yahoo.com
Thu Nov 9 22:25:38 PST 2006
"mmcdermo" <morganmcdermott at gmail.com> wrote in message
news:ej13rk$2gfu$1 at digitaldaemon.com...
> 1) Stability and reliance
As far as anything that hasn't been added in the past few months, D is
pretty solid. Some new things are still a bit buggy (like variadic
templates), but if you stick to the more tried-and-true features, you should
be just fine. There are some bugs relating to imports and protection
attributes, but nothing that can't be worked around.
Additionally, Walter stated (just today!) that D 1.0 will be done by January
1, 2007, if you're looking to see if the D spec or compiler will ever
stabilize.
> 2) Performance
I've been very happy with D's performance. I've written a (relatively
small) 3D game engine in D, and haven't had any trouble with it in terms of
computational power. D is garbage-collected, which is something to keep in
mind if you're going to be writing real-time applications, but with what I
like to call "responsible memory management," GC collection cycles shouldn't
noticeably interrupt your program very often, or at all. What I call
"responsible" is basically you don't go around creating tons of objects for
common tasks, use "auto" to have classes auto-destroyed at the end of scope
where possible, try to deallocate/delete when you know it can be done, etc.
But you don't have to be absolutely nitpicky about it like you do in C/C++.
I like to use the GC as a failsafe for all the stuff that slips through the
cracks.
> 3) Ease of code maintenance
Fantastic. I look at C++ code and wonder how I'm supposed to comprehend any
of it to any reasonable degree. It's always so laden with memory- and
resource-management code, tons of (ugly, hard-to-parse) templates, and
pointers. I look at D code and can understand what's going on almost
immediately. With the much simpler syntax and lack of use of complex
language features to do the simplest of tasks, D is certainly easier to read
and maintain for me. I've written not only the game engine, but also a
scripting language in D, and not once have I wanted for any kind of
container classes or template library. Most of the default data structures
in D are enough for most things I do.
> 4) Ease of implementation
If you mean of the language itself, DMD comes with the source for the
frontend, and there is a compiler, GDC, which takes that front end and
attaches it to the Gnu compiler backend. They're the only two compilers
that I know of, but since you've already got the frontend source, that
should make implementation of a new compiler relatively simple (as long as
you have experience implementing compilers!).
More information about the Digitalmars-d
mailing list