Ada Vs C (with some D mixed in)
bearophile
bearophileHUGS at lycos.com
Mon Jan 19 02:28:52 PST 2009
This is an oldish article (1995) that compares development costs of C and Ada:
http://www.adaic.org/whyada/ada-vs-c/cada_art.html
D is generally a safer language than C, and more productive too. On the other hand Ada has some safeties that D lacks still (and I think D may enjoy having some of them), like for example regarding safety of type conversion, integral overflows, and other things (regarding performance, Ada is similar to statically compiled languages). D requires less lines of code than C and Ada (especially if you use higher order functors like std.algorithm of D2 or my ones), so I think overall the development costs of D may be intermediate between C and Ada ones :-)
Regarding the SafeD I want to say something: I like the idea of SafeD, but safety comes from many things, and not just a single source. So I think SafeD has to improve other things too. Restricting the "safe" of SafeD to just one things (that is just eliminating pointers, I think), goes against the concept of safety. If you want a safer D, then you have to look at doing other things too in a safer way. Because the end purpose of a programmer that wants to use SafeD may be to write safer code, and in real programs bugs doesn't come from a single source! (that is, pointers).
Just for example, Safe D may enforce a safer indenting of code, to avoid the "dangling else" bug (it seems I was quite right, and GCC designers have had the same idea of mine, take a look at recently added warnings of GCC, -Wparentheses and -Wsequence-point here, http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html I think such things have to be built-in in SafeD), take better care of integral overflows, etc.
Bye,
bearophile
More information about the Digitalmars-d
mailing list