Sharing in D
dsimcha
dsimcha at yahoo.com
Thu Jul 31 13:37:35 PDT 2008
== Quote from bearophile (bearophileHUGS at lycos.com)'s article
> Sean Kelly:
> > I am very much concerned that the "future of D" is
> > as a general applications language and that its systems language roots will
> > be left to rot. And who needs another applications language, anyway? The
> > world has a million of them.
> I think D is already partially unfit for being a system language, the runtime
memory footprint is large; here it's compared with Free Pascal:
>
http://shootout.alioth.debian.org/gp4/benchmark.php?test=all&lang=dlang&lang2=fpascal
> The GC can be disabled, but you have to carry it around in the executable
anyway. The size of the executables produced by DMD is large compared to the exes
you obtain from stripped C. At the moment you can't run such things on sytems with
little RAM, as you can do with C.
> Regarding the hard real time systems, I think people there are scared of a GC
(even if in practice it's not a problem). So at the moment there are many things
you can do with C that are a problem to do with D.
> Bye,
> bearophile
A few things: First of all, Pascal is from the Stone Age and therefore has had a
chance to be optimized in every way feasible to make it as tight as humanly
possible. DMD is a reference implementation of a relatively immature language,
and right now the focus is on adding more features and fixing bugs, not on
aggressive space optimization. Maybe once the dust settles a little, the GC can
optionally be made a shared DLL, or excluded outright if the programmer is going
to disable it anyhow, and optimizations can be added to make it more space-efficient.
Second: I actually think D is a great application programming language that fills
a pretty useful niche. I am a computational biologist, so my needs are basically
performance, correctness and ease of use. If I wrote everything in C, C++ or (I
almost don't even want to say it) Fortran, I'd never get anything done because
these are such crufty old languages that are much more difficult to use than D.
If I used Java or C#, I'd pay a much larger abstraction penalty, and have OOP
shoved down my throat where it makes the least sense, namely small but
performance-critical projects. If I used Python or Ruby, the performance penalty
would just be ridiculous unless I wrote some parts in C, in which case...uh, I
kind of wanted to avoid using old-school, low-level languages.
Bottom line is, D gives me most of the ease of use of a high-level dynamic
language and most of the performance of C or C++, and for what I do that seems
like a very good tradeoff.
More information about the Digitalmars-d
mailing list