News for hackers. Stuff that matters.
Re:Introduction to Ada by the_duke on Thursday September 03, 2020 @04:29AM (#24361932)
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 source, with a GPLv3 license. Is this what most companies use, or are there significant closed source parts that must be bought? Are most companies still on older versions?

* What other languages are most similar?

Re:Introduction to Ada by Lucretia9 on Thursday September 03, 2020 @04:44AM (#24362011)
I don't know SPARK and haven't touched it, but...I had to learn Ada9X at uni in 1995, I've been using it for the last 15 years and have been on #Ada on Freenode for longer.

1) The creator of #Ada, caracal, once said that when he was in the army, there were two groups of people: i) those who were interested to learn about Ada and ii) those who were totally against it without having seen any of the language at all. The second group were the ones who, when they came around with the green manuals, just refused to even read them.

2) I went back to Ada after burning out in a shitty games company, essentially sitting in a debugger for 19 hours straight isn't good. The only time I have to use a debugger is when using pointers, Ada allows you to avoid pointers for the most part.

Ada's type system, data modelling, it's unparalleled anywhere else ever.

There's not enough people working with Ada in OSS.

It's easy to burn yourself out on a big project sometimes.

3) Very modern, the docs are good, but the tooling is lacking. But then I come from a time of command lines and no package managers.

Re:Introduction to Ada by thesuperbigfrog on Thursday September 03, 2020 @06:15AM (#24362532)
Alire is an Ada package manager built around the GNAT toolchain: https://github.com/alire-project/alire

I have not used it, but it looks promising.

Re:Introduction to Ada by Lucretia9 on Thursday September 03, 2020 @08:37AM (#24363386)
Currently it's built around gnat, not looked at the source, but I hope they've built in portability across compilers.
Re:Introduction to Ada by jonathanstrange on Thursday September 03, 2020 @05:00AM (#24362114)
I don't have extensive experience but learned it a few years ago and believe I can answer some your questions. This is subjective, others might disagree or perhaps add their own experiences.

> Why did Ada not manage to get a significant foothold outside of some small domains?

Probably mostly due to licensing issues. Ada has a runtime that you basically have to use and the most complete AdaCore version forces you to release executables under GPL. The FSF version is less complete (many libraries are missing) and allows you to use the much more permissive mGPL version. However, it always lags behind the version from AdaCore and many developers in the past were scared away by the licensing issues.

Other reasons often mentioned:

- Ada has a certain (perceived) background in the US military and aviation industry, which some people don't like.

- Ada is a very complete language and not easy to learn. The syntax is special, in that it specifies each construct on its own and re-uses keywords.

- Overuse of pragmas and "glued on" Unicode string handling

> What's great, what's not so great about it?

Great: It's an extremely fast and safe general systems language suitable for all kinds of programs. It allows high level and extremely low level programming and is suitable for embedded programming.

Not so great: The type constraints for generics are not as expressive as they could be. Aliasing rules ("pointers") are stricter than they would need to be. There are a few oddities with anonymous vs. named types to watch out for.

> How "modern" does the language feel, including the tooling, documentation, etc? Specifically Spark 2014.

Tooling and documentation is excellent, thanks to AdaCore and several good books, as well as the official Ada reference. The language does not "feel" modern, because many libraries are old and appear to be outdated. In reality, old Ada code will just compile and run so there is no need to constantly update and maintain libraries.

> Spark2014

Can't answer that question.

> Are there any close alternatives that are production ready?

The GNAT Ada ecosystem mostly maintained by AdaCore is as production ready as a language could be. AdaCore expect you to buy a commercial license if you're doing safety critical work. As for other compilers, that depends on the vendor and most of them do not support the latest Ada standard.

Re:Introduction to Ada by Lucretia9 on Thursday September 03, 2020 @05:37AM (#24362325)
>Probably mostly due to licensing issues.

Yup. See https://www.reddit.com/r/ada/comments/ijwqfl/last_call_on_th...

> Ada has a runtime that you basically have to use and the most complete AdaCore version forces you to release executables under GPL.

See above.

> The FSF version is less complete (many libraries are missing)

Incorrect, AdaCore just packages their libs with their version of the compiler, with FSF, you have to build them yourself, which is a pain. But they are working on that.

> and allows you to use the much more permissive mGPL version.

MGPL hasn't been a thing for at least 10 years now. The FSF version if GPLv3 with linking exception.

> However, it always lags behind the version from AdaCore and many developers in the past were scared away by the licensing issues.

And the cost of licencing from AdaCore. Not small company / startup friendly, but apparently that has changed, but you still have to email them for prices!

> - Ada is a very complete language and not easy to learn. The syntax is special, in that it specifies each construct on its own and re-uses keywords.

This makes no sense, all languages are "complete" to some degree. The syntax is not special, it's like any other, it's defined by a grammar, as are all languages. A lot of languages re-use keywords.

Re:Introduction to Ada by zeroc8 on Thursday September 03, 2020 @05:55AM (#24362419)
I talked to an Ada Core sales guy at Embedded World Nuernberg. He mentioned they have a cheap license now for small companies. 5000 Euros.
Re:Introduction to Ada by Lucretia9 on Thursday September 03, 2020 @08:37AM (#24363395)
When was that? For a company I know who tried to use Ada a while back, that 5K was too expensive even then.
Re:Introduction to Ada by zeroc8 on Thursday September 03, 2020 @04:28PM (#24368512)
Three or four years ago. He talked about a developer license for small companies.
Re:Introduction to Ada by frabert on Thursday September 03, 2020 @07:06AM (#24362799)
That could be cheap or expensive. Is it one-off? Per seat? Per team? Monthly? Yearly?
Re:Introduction to Ada by Lucretia9 on Thursday September 03, 2020 @08:38AM (#24363400)
AIUI, it used to be £5k per seat here.
Re:Introduction to Ada by jonathanstrange on Thursday September 03, 2020 @07:12AM (#24362826)
Thanks for the "corrections". Some of them are fine (I didn't know about the FSF license change) but with some I really don't agree.

> Incorrect, AdaCore just packages their libs with their version of the compiler, with FSF, you have to build them yourself, which is a pain. But they are working on that.

Various fairly essential libraries maintained by AdaCore are under GPL, so you could not use them for non-GPL software that is distributed. That's what I meant by "incomplete", because the FSF version was traditionally used as the free option for developing distributed, proprietary software. AdaCore has always blocked that by making essential libraries GPL instead of, say, LGPL.

If you used AdaCore it didn't matter, since either you were forced to make your program GPL anyway, or you paid for a commercial license.

> MGPL hasn't been a thing for at least 10 years now. The FSF version if GPLv3 with linking exception.

The question asked was why Ada was not more successful / popular. Your correction just adds more evidence to the licensing confusion. The problem is you can't even be certain it stays a certain way.

> The syntax is not special, it's like any other, it's defined by a grammar, as are all languages.

No, Ada has a rather special grammar in comparison to most other languages, because it specifies every construct on its own, and that is one of the reasons why it is harder to learn than other languages. Grammars for other languages are much more compact and use more shared non-literals.

> all languages are "complete" to some degree

That's not the point. Ada provides much more functionality than most other languages, for example memory alignment for embedded programming and OOP with tagged types. It's as expressive as C++ for systems programming. That's what makes it way more complex than lnaguages like, say, Scheme R5RS, C, or Go. It's easier to learn than C++ but it's much harder to learn than a related language like Pascal or Modula, for instance.

> A lot of languages re-use keywords

Whataboutism? Languages that re-use keywords are generally a bit harder to learn than those with only few constructs and no keyword reuse. You don't think so?

I've never met any Ada programmer before who thought Ada does not have a relatively long and steep learning curve. You'd be the first I've met.

Re:Introduction to Ada by Fabien_C on Thursday September 03, 2020 @08:37AM (#24363387)
> Various fairly essential libraries maintained by AdaCore are under GPL, so you could not use them for non-GPL software that is distributed.

That's not true, the AdaCore libraries are covered by the Runtime Library Exception of GPL and available on GitHub: https://github.com/adacore

And soon available in the package manager: alire.ada.dev

> The purpose of this Exception is to allow compilation of non-GPL (including proprietary) programs to use, in this way, the header files and runtime libraries covered by this Exception.

Re:Introduction to Ada by dwheeler on Thursday September 03, 2020 @04:01PM (#24368220)
> I've never met any Ada programmer before who thought Ada does not have a relatively long and steep learning curve. You'd be the first I've met.

Make that at least two, I think Ada's pretty easy to learn.

One thing that makes Ada easier is that if you get something wrong, it's usually a syntax error that's caught by the compiler. GNAT's error messages are very good and will often point you the right way. The whole language was designed to try to catch errors at compiler time. Obviously some errors will slip through anyway, but it helps.

Ada does have some features that you have to learn about before you can use them. That's true for any language. E.g., it has a task (thread) system built-in; if you want to use it, you'll need to learn it :-).

Re:Introduction to Ada by neverartful on Thursday September 03, 2020 @10:14AM (#24364253)
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 by pjmlp on Friday September 04, 2020 @03:50AM (#24372717)
Turbo C++ 1.0 for MS-DOS could be had for about 100 euros on 1990's money, and it was just a couple of floppies.

No way you could get your hands on an Ada compiler for MS-DOS in a similar way.

Re:Introduction to Ada by froh on Friday September 04, 2020 @01:36AM (#24372020)
I wonder if ADA and the gnat company have created barriers to entry that prevent a community to form that gets ADA beyond the tipping point.

The gnat and base library license confusion has been discussed in the thread.

In addition to that I'm missing a succinct and to the point introduction to ADA. The signal to noise ratio of the standard "programming in ADA 2012" book was freaking me out. I stopped looking into the language not because the language was hard but because it was explained so poorly.