Live data from Hacker News

Introduction to Ada

learn.adacore.com

121–130 of 193 posts

Re: Introduction to Ada

#121
post #55

The GNAT Ada compiler is open source, generates good code, and has really good error messages. There's a story behind its development, which I tried to summarize here: https://dwheeler.com/essays/make-it-simple-dewar.html

Thank you for posting that. Especially interesting in light of Walter Bright's comment(s) in this thread. I didn't quite understand why someone who wrote a c++ compiler would think Ada was insurmountable - this adds some context. In my nativité I'd have guessed that writing an Ada compiler was on par with Pascal (but with more types and stuff). This is probably the same (wrong) reasoning by which Mr Bright tricked hi…

I had always heard that PL/I and Ada are much more difficult languages for producing a suitable compiler.

Re: Introduction to Ada

#122
post #27
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…

It looks similar to Pascal? I learned to program in Pascal as a kid always had a soft spot for it

Pascal is one of Ada's parents, definitely. I did Pascal then transitioned to Ada quite easily in university.

Re: Introduction to Ada

#123

I'd be very interested in someone with substantial experience in Ada/Spark providing some insight: * Why did Ada not manage to get a significant foothold outside of some small domains? * What's great, what's not so great about it? * How "modern" does the language feel, including the tooling, documentation, etc? Specifically Spark 2014. ( I see a LSP server and VSCode plugin, for example) * Spark2014 seems to be open…

Regarding 'why did Ada not manage to get a significant foothold outside of some small domains?' here are some factors that were relevant at that time (late 80s to early 90s):

* The internet was either practically non-existent, or in its infancy. At that time, getting compilers, documentation, and sample code was much more difficult and time consuming.

* I recall there being a fair bit of criticism about Ada being 'designed by committee' and having a reputation as such.

* C was still shining brightly and overall well-liked. C++ being an improved C, was seen as a very desirable new language for the software development community.

Re: Introduction to Ada

#124
post #80

Earlier quoted context omitted.

Interesting. Never heard of SETL before. There is even a Wikipedia entry: https://en.wikipedia.org/wiki/SETL . References 1 and 2 confirm that it was indeed used to implement the first validated Ada compiler. Didn't know that.

Another factoid: It was actually SNOBOL (later SPITBOL from Dewar, who was a founder and president of Ada Core), not AWK, that was the first language to offer "associative arrays", which are simply called "tables".

I like the story why they renamed from SEXI to SNOBOL, see https://en.wikipedia.org/wiki/SNOBOL#Naming.

Re: Introduction to Ada

#125
post #86

Earlier quoted context omitted.

Pascal-like syntax seemed to have been popular around the time. Outside the Writh languages(Pascal, Modula, Oberon) and Ada, I was reading about CHILL[0] the other day, which is supposedly similar to Ada, but was rather domain specific. Sadly I don't think any modern, free implementations exist. [0] https://en.m.wikipedia.org/wiki/CHILL

VHDL has a quite similar syntax, too.

Indeed VHDL is supposedly based as much as possible on Ada syntax. Naturally you would have several differences due to the purpose of the languages, but they are _very_ similar IMO

Re: Introduction to Ada

#126
Shame that the tools for Ada go from bad to worse even in the best case scenario. It's no wonder nobody really wants to use the language when other languages have all sorts of tools and ecosystems around them that make everything a breeze.

Re: Introduction to Ada

#127

Earlier quoted context omitted.

I think someone was looking for that. You don't have a copy of the other languages do you? Red is online, but blue and yellow are not.

I bought the original spec MIL-STD-1815 10-December-1980 back in 1980 or so, but it didn't survive a purge I made when moving. A couple years ago I went looking for it. It's not online anywhere, but I found an old library copy for sale and snapped it up. It's green, and I don't have any of the other specs. I'm sad I also purged my DECSystem-10 "Orange Book". I've never been able to find a replacement anywhere.

Do you remember if the nickname was "Orange Book" or was it "phone book"? I didn't see the former when searching for more information, but the latter was referenced here [0].

If it's actually "phone book", then [1] seems promising.

[0] http://www.columbia.edu/cu/computinghistory/pdp10stuff/

[1] http://www.bitsavers.org/pdf/dec/pdp10/TOPS10/1972_PDP-10_Us...

Re: Introduction to Ada

#128
post #9

I wish Rust had Ada's type system. It makes a lot of sense to define types specific to your algorithms and have the storage type determined at compile time.

Sorry, can you elaborate? I'm skimming through the documentation and I can't find a section on having "the storage type determined at compile time", except for the section on arbitrary-range integers.

Re: Introduction to Ada

#129
post #34

What an ugly, unintuitive language. Are there any benefits to Ada over something like c++?

An advanced type system: https://learn.adacore.com/courses/intro-to-ada/chapters/stro... Built-in concurrency and concurrent-safe data passing: https://learn.adacore.com/courses/intro-to-ada/chapters/task... Design-by-contract programming: https://learn.adacore.com/courses/intro-to-ada/chapters/cont... Provably safe programs if you use the SPARK subset of Ada: https://learn.adacore.com/courses/intro-to-spark/chapters…

> An advanced type system:

Not compared to Haskell.

Ada has a strong type system for an Algol-derived language, but the world has moved on without it in terms of type systems in general.

Re: Introduction to Ada

#130
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.

It's worth adding that GNAT, at least, has pretty-printing tools that will fix up casing to whatever standard you've specified in your project.
Post reply on HN