Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I don't think the Ada story is particularly interesting:

(1) It was very expensive to licence at a time where C was virtually free.

(2) It was a complicated language at a time where C was (superficially) simple. This made it harder to port to other platforms, harder to learn initially, etc.

(3) All major operating systems for the PC and Mac happened to be written in C.

Ada had virtually nothing going for it except being an amazingly well-designed language. But excellence is not sufficient for adoption, as we have seen repeatedly throughout history.

Today? Virtually nothing stops you from using Ada. For lower level code, it's hands-down my favourite. Picking up Ada taught me a lot about programming, despite my experience with many other languages. There's something about its design that just clarifies concepts.



(3) wasn't relevant (or even really true) in 1977-1983 when Ada was being standardized.

MS-DOS was mostly x86 assembly, Classic MacOS was a mix of 68k assembly and Pascal, CP/M was written in PL/M, UCSD P-System was Pascal, and this leaves out all of the OS Options for the Apple II - none of which were written in C. I'm hard pressed to identify a PC OS from that time period that was written in C, other than something Unix derived (and even sometimes the unix derived things were not C, Domain/OS for example was in Pascal).

If we leave the PC space, it gets even less true - TOPS10/20 NotC, RSX-11 NotC, VMS also NotC - and I can keep going from there - the only OS from the time period that I can point at from that time period that was C is UNIX.

I'd actually argue that C/C++ were not enshrined as the defacto systems programming languages until the early-90's - by that time Ada had lost for reasons (1) and (2) that you noted.


https://en.m.wikipedia.org/wiki/Ada_(programming_language) - it was mandated for some projects both by NATO and US DoD.


> Virtually nothing stops you from using Ada

What would you recommend for getting started with it? Looks like there's GNAT and then also GNAT Pro and then the whole SPARK subset, which one would be best for learning and toying around?


GNAT. Upgrade to gprbuild when you start to find gnatmake limiting.

SPARK is best considered a separate language. It gives up some of the things that make Ada great in exchange for other guarantees that I'm sure are useful in extreme cases, but not for playing around.


If you are playing with Ada, be sure to try out Alire, a 'Rust cargo'-style tool for Ada libraries:

https://alire.ada.dev/

One thing to be aware of is that GNAT is part of GCC:

https://gcc.gnu.org/wiki/GNAT

AdaCore is the primary developer of GNAT, SPARK, and related tools:

https://blog.adacore.com/a-new-era-for-ada-spark-open-source...

There are other Ada compilers as well:

https://forum.ada-lang.io/t/updated-list-of-ada-compilers/10...


Oh man that style guide is triggering hard :D

> Use three spaces as the basic unit of indentation for nesting.

https://en.wikibooks.org/wiki/Ada_Style_Guide/Source_Code_Pr...


gnatformat is a handy tool for formatting working Ada code:

https://github.com/AdaCore/gnatformat

I had forgotten about the three spaces for indentation. Yuck.


> All major operating systems for the PC and Mac happened to be written in C.

They were written in “not Ada”; the original OS for the Mac was written in assembly and Pascal.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: