I love Ada, unfortunately it’s real world use seems to be relegated to old legacy code. I’d like to use it a little more on the side, but I also need to keep my priorities focused on realism, which sadly means ignoring Ada and learning something like C++ which seems unapproachable from any angle. Ada also seems to have a weirdly negative rep in many circles it seems. I recall looking around for an Ada compiler for a…
Lack of a free compiler with permit to use commercially (gnu linker exception), was a problem during a significant phase of the language.
Giving Ada a Chance
131–140 of 261 posts
Re: Giving Ada a Chance
#132Earlier quoted context omitted.
Right. I know it works with numeric indexes in Pascal. My point was that (using my previous example) in Ada it works with any discrete type, in that case characters (which are not numbers in disguise in Ada) so I can do this: Histogram : Character_Histogram; ... Histogram['A'] := Histogram['A'] + 1; (Ok, a bit more work because I didn't initialize the histogram to 0.)
Square brackets are coming, so you'd have to use ('A')
Re: Giving Ada a Chance
#133Re: Giving Ada a Chance
#134Earlier quoted context omitted.
Well, "range" was not the correct term. What I meant is that you can't treat the source as sparse. You can't skip portions of it. So you can't make an array that only covers every other element of this enumeration: type Colors is (Red, Green, Blue, Black, Gray, White); It has to be a consecutive group of them, taken in order, as the specification of even this enumeration has an ordering to it as far as Ada is concern…
Ada 2012 allows you to define gaps, this is my best example I have available https://github.com/Lucretia/sdlada/blob/master/src/sdl-video...
Re: Giving Ada a Chance
#135> I can’t help but think that complicated programming paradigms would seem more intuitive to beginners if taught through Ada instead of C and its derivative languages, as is common in computer science and engineering faculties worldwide. At my university, the first courses you took in CS used Ada. I think it was a really good choice but I was in the minority I guess because after my year they switched to either using…
A lot of Universities and company's were bribed by Sun to start using Java.
Re: Giving Ada a Chance
#136I like the "clean feel" of Ada's syntax: it combines the elegance of Python with a bit more structure and does not suffer from Python's significant whitespace issues. The so-called "Ada comb" structure that is used for packages, subprograms, and even declare blocks makes it easy to find what you are looking for because it makes the source code more regular. The "Ada comb" is formed by the shape of the source code wit…
> The so-called "Ada comb" structure that is used for packages, subprograms, and even declare blocks makes it easy to find what you are looking for because it makes the source code more regular. "Declare" blocks are a PITA. I don't mean the declaration part in the subprogram example you quoted (that's fine), but having to use explicit "declare" blocks to create new variables in the scope of a loop or a conditional. Y…
Re: Giving Ada a Chance
#137Earlier quoted context omitted.
Pascal (well Delphi/FreePascal incarnation) also works with chars and enums. This modern pascal is very feature rich and has plenty of fancy bells and whistles.
Wirth's original, standard Pascal allowed for int/char/bool/enum, and ranges thereof, as array bounds; it wasn't a Delphi enhancement.
Re: Giving Ada a Chance
#138> I can’t help but think that complicated programming paradigms would seem more intuitive to beginners if taught through Ada instead of C and its derivative languages, as is common in computer science and engineering faculties worldwide. At my university, the first courses you took in CS used Ada. I think it was a really good choice but I was in the minority I guess because after my year they switched to either using…
Re: Giving Ada a Chance
#139> I can’t help but think that complicated programming paradigms would seem more intuitive to beginners if taught through Ada instead of C and its derivative languages, as is common in computer science and engineering faculties worldwide. At my university, the first courses you took in CS used Ada. I think it was a really good choice but I was in the minority I guess because after my year they switched to either using…
I liked Ada a lot, but Java gave me employment after school.
Re: Giving Ada a Chance
#140> The writing is on the wall: Ada is here to stay. OK, this has no relation to the actual content of the article, but I have to point out that that is not what the phrase "the writing is on the wall" means.