[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: The D programming language



On Sat, Nov 12, 2005 at 11:52:55PM +0100, Romain Failliot wrote:
} Hi!
} 
} I've got interested in the D language since the C++ language is
} becoming worse and worse in front of the C# and Java ones. But C++ is
} the only C-style syntax language that doesn't have to run above a
} virtual machine.

...other than C itself, of course. And Objective-C (which has a runtime but
not a virtual machine). And don't go rejecting virtual machines out of hand
based on performance. A well-implemented virtual machine can get better
(amortized) performance than optimized machine code since it can perform
compilation based on dynamic analysis as well as static analysis. The main
thing that makes a runtime and/or virtual machine undesirable for one
purpose or another is memory footprint, which tends to be more important
for embedded systems than anything else. This is not to say that a VM-based
language is always the right choice when not targetting an embedded system,
just that VMs are not inherently undesirable in most cases.

} Here is a good quote about it:
} "It seems to me that most of the "new" programming languages fall into
} one of two categories: Those from academia with radical new paradigms
} and those from large corporations with a focus on RAD and the web.
} Maybe it's time for a new language born out of practical experience
} implementing compilers." -- Michael

One could easily argue that languages should not be designed with the
compiler in mind but should be designed with the developer in mind. The
reason we use higher level languages than C (I say C rather than assembly
to make the point that I am not talking about portability) is for the
convenience of the developer, which translates to shorter development
times, smaller code bases, and fewer bugs (based on a constant number of
bugs per lines of code, which has been shown to be the case over and over
again).

} I was surprised to see how good the D language seems to be, garbage
} collection (http://www.digitalmars.com/d/garbage.html), no more
} preprocessor dependancies (no need to #include and the #ifndef stuff),
} C99 new types, no more #define (only the static keyword), UTF-8
} charset, a way to set a default value in the typedef's, no more
} "pointer or not pointer?"...

One of the more infuriating aspects of Java is its lack of preprocessor
directives. Yes, they can be overused, but there is significant value to
being able to maintain a single codebase with minor variations.

} See also the http://www.digitalmars.com/d/cpptod.html to see the major
} differences between C++ and D.

The most valuable part of C++ is its well-designed, well-tested template
library. The page you reference shows some sharp corners from C++ that D
smooths, some of which are pretty obscure, but it does not seem to provide
all that much value. It's nice, but it's nice in a minor version number
kind of way, not a revolutionary kind of way.

} I'm not fond of the gargage collector, but it's true that if the code
} is well written, there is no problems.

Garbage collection is there because it has been shown, over and over again,
that the performance hit for garbage collection is negligible compared to
the debugging effort required to avoid memory management bugs.

} I'm wondering if it's possible to have a debian package that could add
} the D language to gcc? like "gcd", as g++ stands for c++ on gcc...

You should have read the site more carefully. There exists a gcd (GCC
frontend for D) which can be found at
http://home.earthlink.net/~dvdfrdmn/d/

If what you are asking for is a Debianized package, you want to submit an
RFP (request for package) bug against the wnpp virtual package.

} Well, I hope i could have some answers on this, because I'm really
} interested!

Be interested, but don't expect it to be all that. The value of a language
is a lot like the value of a network; what matters is largely how many
other people use it and provide reusable components (libraries) for it.

} Regards,
} Creak
--Greg



Reply to: