Live data from Hacker News

Introduction to Ada

learn.adacore.com

41–50 of 193 posts

Re: Introduction to Ada

#41
post #29

After having seen the C++ guidelines of the automobile industry i wish we'd just use Ada more..

I spent a lot of time circa 2009/2010 teaching myself Ada for similar reasons. I work in avionics systems (or used to, present job is not) and Ada is grossly underutilized. I’d be willing to wager half the bugs that I saw make it to the testers or, worse, the field would not have happened if we’d used Ada (and used the type system properly). And these days, using Spark, even more bugs could be detected before compila…

Using Spark contracts to specify and verify low level requirements should be a huge time saver. I too don't understand why everybody seems to use C/C++ nowadays. I guess commercial Ada is just too expensive.

Re: Introduction to Ada

#42
post #41

Earlier quoted context omitted.

I spent a lot of time circa 2009/2010 teaching myself Ada for similar reasons. I work in avionics systems (or used to, present job is not) and Ada is grossly underutilized. I’d be willing to wager half the bugs that I saw make it to the testers or, worse, the field would not have happened if we’d used Ada (and used the type system properly). And these days, using Spark, even more bugs could be detected before compila…

Using Spark contracts to specify and verify low level requirements should be a huge time saver. I too don't understand why everybody seems to use C/C++ nowadays. I guess commercial Ada is just too expensive.

[deleted]

Re: Introduction to Ada

#43
post #7

Ada is one of those languages that I always wish I had a reason to program in

It was my first language i learned in school... in Radford ( Virginia), before my university switched to Java. ADA was/is popular with defense contractors, so a lot of schools in VA teach it. It is very safe language, being both static typed, and strong typed. It was originally a procedural language, but later they added some OO to it. (to folks that don't know what a imperative language is, think of a language where…

People need to stop using "wordy" when they mean "readable."

Re: Introduction to Ada

#44
post #10
post #6

Petty and inconsequential as this sounds, I'm convinced Ada go have gone farther if it didn't have capitals and underscores in all their libs, and long keywords like `procedure`. All that shift-key action makes Ada a physically painful language to work in.

One of the "Steelman" requirements that Ada was built to satisfy was that any program should be able to be represented with a subset of ASCII that would be compatible with the largest range of terminals, teletypes, and punched cards as possible. Less relevant today, but that's why Ada has so many keywords in it's syntax.

You should count up how many keywords C++ has, then count the number in Ada.

Re: Introduction to Ada

#45
post #6

Petty and inconsequential as this sounds, I'm convinced Ada go have gone farther if it didn't have capitals and underscores in all their libs, and long keywords like `procedure`. All that shift-key action makes Ada a physically painful language to work in.

Ada is case insensitive, so if you really wanted to you could write it in all lower or all upper case. Although, your source would be considered hard to read.

Re: Introduction to Ada

#46

Nice documentation. Ada looks a lot like Pascal. It is interesting that SPARK is a subset of subset of Ada.

It's Pascal inspired but certainly not any of Wirth's syntaxes, like 1/2 line if's, semi colons in weird places making blocks look odd. Ada has a more inclusive syntax, whereby "is" or "begin" and "end" encases what is inside it. Compare Modula's:

    MODULE X;
        ...
    END MODULE X.
and Ada's:

    package X is
       ...
    end X;
Ada's package feels like one statement containing others, whereby Modula's looks like it ends on the first line.

Re: Introduction to Ada

#48

I always liked Ada, from my first reading around 1980 of MIL-STD-1815. Many of D's features were inspired by Ada.

Shame you didn't write an Ada compiler, the docs were available. It would've been interesting to see what you would've come up with. It'd still be interesting I think.

A lot of the older closed compiler are still based around the program library idea which is no longer required, considering GNAT is file / project based. I've only used GNAT and have no idea how the program library versions work.

Re: Introduction to Ada

#49
There are many industries that could benefit from Ada, but one in particular is the games industry, but then, they'd also have to start designing stuff, stop feature creep and changing every little thing all the time, and crunch.

Re: Introduction to Ada

#50
post #7

Earlier quoted context omitted.

It was my first language i learned in school... in Radford ( Virginia), before my university switched to Java. ADA was/is popular with defense contractors, so a lot of schools in VA teach it. It is very safe language, being both static typed, and strong typed. It was originally a procedural language, but later they added some OO to it. (to folks that don't know what a imperative language is, think of a language where…

People need to stop using "wordy" when they mean "readable."

That's not necessarily the same thing though. Verbosity can obscure the information you're trying to gather from the code you're reading. A "can't see the forest for the trees"-kind deal.
Post reply on HN