"Peter Koch Larsen" <pk*****@mailme .dk> wrote in
message
news:y8******** *************@n ews000.worldonl ine.dk...
After reading some ideas about Ada,
My conclusion is that there are some nice ideas
out there, but that they mainly protect against the "sloppy" programmer.
Actually, the inherent type safety, along with the
visibility rules in Ada
do a bit more than "protect against the 'sloppy'
programmer." I wonder
there is real protection against a truly sloppy
programmer, in Ada or
elsewhere.
Then again, perhaps we are all a little sloppy now
and then. I know I sometimes
make stupid mistakes while coding that the Ada
compiler brings to my attention.
The larger issue is how Ada scales up to
programming in the large for safety-critical
software. Few other languages do scale up as well
as Ada. For a small, one-person
job, I'm not sure it matters so much what
programming language you choose. However,
when you are building a large team of programmers
and need high level of confirmability
wrt the inter-relationship of the varioius
modules, Ada serves much better than most
alternatives.
A key idea in Ada, one that I like much better
than in other languages (although this
aspect of Modula-3 is pretty good), is the model
for separate compilation. Space
in this posting does not allow one to do full
credit to this capability, but it is one of
those features of the language that, when used as
it is supposed be used, makes the
team development process so much easier.
For real-time embedded systems, Ada allows easy
navigation from one level of abstraction
to another, and allows that navigation to be safe.
We can, and usually do, design our
programs at a high level of abstraction.
However, when it is required to descend to the
machine level, we can do, but with greater safety
(built-in rules) than one might do with
some other language.
Anyone who has ever made an mistake in pointer
arithmetic knows how entertaining
it is to spend long hours searching for the source
of some run-time fault. Never made
that kind of mistake? You only need to make it
once for it to be memorable.
Some find Ada to be a little difficult to learn at
first. In particular, the rules that govern
something called "visibility " give new programmers
a bit of trouble. For those programmers
who insist on fighting this feature, there is no
end of trouble. I like to use the analogy of
the rotating-brush floor buffer. When you flip
the switch on that buffer, you need to know
just how to control it or it will run away with
you. Once you let the buffer have its way, you
can make subtle little movements to make it go
where you want it to go instead of dragging
you all over the floor.
The more persnickety features of Ada are a lot
like the floor buffer. Once you learn how to
control them, use them to your advantage, and
understand their purpose, the language becomes
easy and fun to use. The problem is that most
programmers fight those features and complain
because they refuse to abide by them. Those who
do learn the visibility rules tend to build
excellent, dependable, and maintainable software,
and with much less sweat, tears, and blood
than the corresponding programmer in language X.
Or is the wrong end of the third-from-the-end
letter of the alphabet?
Richard Riehle