(no title)
jmilkbal | 10 years ago
Ada has a neat OO system (not like the Javas or C++s), built-in state-of-the-art tasking (since 1983!), ranged types (one of the things I can hardly bare to live without), but also simple things like switches that aren't useless and just a general appreciation for what a discrete type can allow you to do. It has generics, too, though I know they've been proven irrelevant by newer languages. Have you seen that new Java 8 date time stuff? It's playing catch up to Ada. Ada's numerics are, hands down, the best facilities of any mainstream language.
Most importantly, it's probably already available for your Linux distribution because it's a part of the GNU Compiler Collection, which means that it's on the commercial OS you've settled for, as well.
An out of print book that I always recommend to those who are interested in playing with Ada is John English's "The Craft of Object-Oriented Programming". Enjoy.
http://www.adaic.org/resources/add_content/docs/craft/html/c...
david-given|10 years ago
It's a seriously nice language --- it feels like a mature, well-thought-out C++ without a lot of the craziness and ancient edge cases. There are moments of sheer brilliance: the pointer scoping semantics mean that it's actually _syntactically invalid_ to leak pointers from an inner stack frame to an outer one. Its tasking and concurrency support is amazingly good. Having proper nested functions are amazing. The type system, while no Haskell, is easily good enough to say things like 'bounded array of tagged unions with length not known at compile time', with both compile and run-time error detection. And all this produces code that performs on a par with a modern C++ compiler!
Here's a multithreaded Mandelbrot renderer what I wrote: http://ideone.com/a1ky4l Note that each thread is a scoped object nested inside a function, communicating with each other via strongly typed and named messages --- startup and shutdown synchronisation happens automatically...
That's not to say there aren't warts; the OO system is pretty painful, with some annoying hidden requirements (e.g. you have to define a class' methods adjacent to the class structure itself, otherwise the compiler gets confused; if this is a requirement there should be explicit syntax for it). Having case insensitive identifiers is a complete failure. Exceptions are just plain clunky. There are a number of syntactic weirdnesses where the language got expanded beyond the original syntax' ability to cope. But the big omission is that there's no garbage collector, even though the language was obviously designed to have one. It would be so, so much nicer to write real code in if it had one.
Ada really deserves to be better known than it is.
jmilkbal|10 years ago
http://www.adahome.com/History/Steelman/steeltab.htm http://www.adahome.com/History/Steelman/intro.htm
stickfigure|10 years ago
I've not written a single line of either post-graduation.
pjmlp|10 years ago
Although Ada seems to be quite well in high integrity systems. At least that is my perception from the, now regular presence, at FOSDEM and European safety conferences.
jmilkbal|10 years ago
Edited because I was misleading about the introduction of OO.
marrs|10 years ago
krylon|10 years ago
Ranged types are awesome. Like I said, I did not use Ada a lot, but I have on a few occasions when programming in other languages missed them.
Also, the diagnostics the GNU Ada compiler gave me were a lot more helpful than anything a C++ or C compiler ever gave me.
jmilkbal|10 years ago
mcguire|10 years ago
The nightmares aren't like each other, they are the same nightmare, just with the spooge scraped into slightly different piles.
Further, a language won't clean it up; that's going to take something seriously different. In fact, I suspect the spooge is irreducable past a certain point. I believe it is the nature of the problems.
That being said, Ada is a significant improvement over many others, in many cases for the reasons you describe.
"though I know they've been proven irrelevant by newer languages"
Uh, what?
the_why_of_y|10 years ago
> Uh, what?
Sarcasm, presumably; cf. Golang.
gmfawcett|10 years ago
ble|10 years ago
Is it wrong to read this sentence as snarky?
reitanqild|10 years ago
Honest question, honest answer: yes. Dry humor maybe.
The reason why my snark detector passes this one is because there is no reason for the author to be snarky here.
endgame|10 years ago