Why I chose D over Ada and Eiffel
Ramon
spam at thanks.no
Thu Aug 22 08:42:13 PDT 2013
>> http://www.eecs.harvard.edu/~greg/cs256sp2005/lec15.txt
I have quickly looked over that paper and find it quite worthless
for a couple of reasons (I will not elaborate on, except one: All
these scientific elaborations are nice and all but we have real
problems here in the real world. Frankly, someone having worked
on "Cyclone" may be bright and all, but he definitely hasn't got
som major points).
While Eiffel and D look (and in quite some respects are) quite
different, both have actually realized some important real world
problems and have them addressed in not so different conceptual
ways.
One of the reasons D is considerably more safe than C is
strikingly simple and one doesn't need any scientific research to
spot it: D offers (a quite sane implementation of) strings and
"resizeable arrays".
Why is this related to safety? Because zillions of bugs have been
created by programmers desperately using, bending and abusing
what was available in C (and to a degree in C++). Give them
reasonable strings and some reasonable way to handle dynamic
arrays and you have prevented gazillions of bugs. Simple as that.
Another pragmatic look at reality underlines my point: In todays
world even major software projects are being worked on by people
with an almost brutally large degree of variation in their
skills. Even worse, each of them (at least sometimes) has to work
with code written by others with a (sometimes very) sifferent
level of skills.
D has made a very major contribution to safety alone for the fact
that it allows less skilled people to create less errors.
And it has something else that might not seem that big a thing,
that however, started a (imo) very important path: safe, trusted
and system.
In C/C++ pretty everybody can - and does - play with potentially
dangerous mechanism (like pointers) pretty much everywhere. Those
simple 3 "code classes" safe, trusted and system can help a great
deal there. One (OK, not very creative) example that comes to
mind is to have less experienced programmers to work in "safe
mode" only, which anyway is good enough for pretty everything the
average app needs, and to limit "system mode" to seasoned
programmers. Furthermore this D mechanism offers something else
of high value by introducing a simple and important question "How
much power do I need?".
I might sound streetwise rather than properly educated, I know,
but I have experienced again and again that what really counts is
results. And I'm sure that D, if understood and used properly,
contributes quite much to a very important result: Less bugs and
more reliable code.
More information about the Digitalmars-d
mailing list