2 ms·
When Ada came out it was a large intimidating language. The saying was "to learn Ada, it's best to know Ada first." I haven't touched it in a long time, but I
by m463 7y ago
When Ada came out it was a large intimidating language. The saying was "to learn Ada, it's best to know Ada first."
I haven't touched it in a long time, but I remember some of the impressions it made on me when I first used it.
The type system: I think you could do some really fancy things like:
speed := miles_traveled / elapsed;
You could use types to make speed type mph, miles_traveled be miles and elapsed be hours.
the thing is, I think you had to create some conversion stuff for the "/" so that it allowed two types to be divided, returned a third type.
unchecked conversion: no matter what you did, you had to interface with hardware. So there was a lot of unchecked_conversion() stuff to convert between basic machine stuff.
argument lists: You couldn't have a printf() or any other varargs type stuff that I remember. This made interfacing with external libraries that needed this kind of stuff lots harder. (maybe there are ways to do this)
there were things I really did like
the package and package body stuff: You could implement a bunch of interfaces, and compile against the prototypes before the implementations were written.
the attributes, like foo'Size and the system package let you write your code to be correct even if system types or machine types changed
A lot of Ada is really tedious, but once you got over that, working with an existing project was usually really nice.