Andrew Lentvorski wrote:
Gus Wirth wrote:
Why doesn't anyone like Ada?
Ada was meant to accompany Waterfall development and extensive, fixed
specifications. Name somebody *other* than the government who gets to
operate in that environment.
I don't understand how a language is tied to a particular development
model. If anything, I would say that Ada is "Design by Contract" in that
the interfaces are separated from the implementation and you can even
compile before the body (implementation) is done.
Also, Ada's vaunted "reliability" was found to have the same problems as
any other language (See: Ariane 5 explosion). The reliability of the
Space Shuttle software is less about the language than about the process
in which that language is used.
Don't blame the language for the stupidity of people. From Wikipedia:
<quote>
Because of the different flight path, a data conversion from a 64-bit
floating point to 16-bit signed integer value caused a hardware
exception (more specifically, an arithmetic overflow, as the floating
point number had a value too large to be represented by a 16-bit signed
integer). Efficiency considerations had led to the disabling of the
software handler (in Ada code) for this error trap, although other
conversions of comparable variables in the code remained protected. This
led to a cascade of problems, culminating in destruction of the entire
flight.
</quote>
Superfically, because Ada isn't succinct. Lines of code productivity is
constant. Verbose languages are less productive.
Where is the proof for that? You're saying that because I have to type
more I'm less productive? If my typing speed was my limiting factor,
then maybe. But I would hope that programmers spend much more time
thinking than typing.
The fact that so many bugs crop up in succinct languages counters your
argument. Writing bugs is not being productive. Java is more verbose
than C yet it can be argued you're more productive using Java because it
eliminates entire classes of bugs, for example pointer problems.
Hence, programmers
shy away from verbose languages.
See:
package Keyboard is
type Key is tagged private;
procedure Press (K : in out Key);
private
type Key is tagged record
On-Off : Boolean := False;
end record;
end Keyboard;
package Keyboard.Numbers is -- a child of Keyboard
type Numeric-Key is new Key with private;
procedure Press(Number : in out Numeric-Key);
type Number-Zero is new Key with private;
procedure Press(Zero: in out Number-Zero);
type Number-One is new Numeric-Key with private;
procedure Press(One : in out Number-One);
-- and so one for all numbers
private
type Number-Set is range 0..9;
type Numeric-Key is new Key with record
Value : Number-Set;
end record;
type Number-Zero is new Numeric-Key with null record;
type Number-One is new Numeric-Key with null record;
-- and so on for all numbers
end Keyboard.Numbers;
And with just a brief introduction to Ada I'll bet just about everyone
reading this snippet can figure out what it does[1]. Since software is
write a couple of times and read many, many times, I prefer a little
verbosity.
Gus
[1] The snippet above is the equivalent of object declarations in Java.
Procedures are functions without a return value. Ada is a strongly typed
language.
--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg