Live data from Hacker News

Why Ada Is the Language You Want to Be Programming Your Systems With

hackaday.com

141–150 of 330 posts

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#141

Earlier quoted context omitted.

Nobody wants to play with their compiler to get a small binary. Languages are typically judged by their defaults. If rust can produce small binaries, then it must produce small binaries.

If big binary works faster, I would prefer big binary any day. Nobody cares about disk size.

And for most compilers, changing whether you care about binary size or performance, is a single switch away, not a series of enhancements you need to refer to a blog page to ensure you're doing it right.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#142
post #114

Earlier quoted context omitted.

A language doesn't make code automatically reliable, but it can certainly help. Ada can do overflow checking, so choice of language can have an impact on reliability, but the software engineers deliberately disabled some of those checks to save CPU cycles on a computer that was running at/near capacity. Their reasoning was that it was impossible for the variables in question to overflow given the known flight charact…

This is why I always document considerations like these with stuff like: “This error case can’t happen because foo” or even better, enforce these things by type system and let the compiler decide if it really can’t happen once you changed something in the other part of the code.

Ada could have enforced those at the type system level, it has bounded types, but those checks were disabled.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#143

Earlier quoted context omitted.

Because they overlap almost entiely in use case?

How? Ada was designed for programming safety-critical, military-grade embedded systems. Rust was designed as a memory-safe, concurrency-safe programming language, largely to overcome the shortcomings of C++. Each excels at what it was designed for, but the intended use cases are very different. Rust is not (currently) being used for aircraft flight control systems--Ada is. Ada is not (currently) being used for high-p…

Those are good points. While I can see rust flying within the next few years, I dont see it in flight controls for a while yet. That said I'm aware of c++ flight control software which seems insane. And that seems to be the trend. Rust does target embedded so there is no reason not to try and move it in that direction, though ada seems a much better choice.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#144
post #4

I really like the language, but the only compiler I'd trust is the adacore one and I imagine it is pretty pricey for commercial work

Why not FSF’s GNAT? It’s been a while since I used it, but I remember preferring its error messages to some commercial offering we had around.

SPARK [0], to put it simply. Contracts and static analysis rather than runtime checks takes Ada from being good to being great.

I do prefer GNAT's error messages over AdaCore's compilers (despite the compiler frontend still being based on GNAT), but SPARK adds a ton.

[0] I should note that SPARK 2014 is also available as a GPL'd "community" edition.

EDIT: Asterisk + HN formatting

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#145
post #72

This article promotes a popular misconception of the programming situation for defense projects in the 1970s. There may have been "hundreds of specialized programming languages" in existence that could be used, but just a handful actually predominated. Most aeronautical projects were done in JOVIAL. I've talked about this history with engineers from the 1960s-70s. They did not regard the introduction of Ada as a good…

As I've probably posted before, I was at a Dijkstra lecture in the early 80s where he put up one of his famous hand-drawn slides that said "Ada: The latest government boondoggle that will take 5 years and 5 million dollars to kill." [5 million dollars was a lot of money back then.] So yeah, even the academics didn't much care for Ada.

What did Dijkatra like? Pascal?

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#146
post #137

Earlier quoted context omitted.

Many of the 'programmers' of those days lacked the sophistication and education to appreciate Ada. Just the mojo required to print an integer (having to instantiate a generic) was considered complicated Ada was also very slow to compile, on the order of 10 times slower than Jovial. (my experiences) Avionics systems back then were tiny. Jovial usually ran on a 16 bit processor. Ada enabled a certain maturity and corre…

I can sympathize with resistance to Ada in a sense: Big "enterprise-y" languages can feel unwieldy and cumbersome if you're used to bit-twiddling and struct-packing in something like C. But as the recent Boeing debacle has shown, the avionics domain is in need of greater sophistication and reliability. What it doesn't need is more hackery, as satisfying as that may be for the hardware hackers. Though Ada isn't a mass…

Wasn't the ill fated code itself written in Ada? That is essentially all that goes on boeing aircraft. I don't think a lack of software engineering rigor is to blame for the design mistake.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#147

Earlier quoted context omitted.

As I've probably posted before, I was at a Dijkstra lecture in the early 80s where he put up one of his famous hand-drawn slides that said "Ada: The latest government boondoggle that will take 5 years and 5 million dollars to kill." [5 million dollars was a lot of money back then.] So yeah, even the academics didn't much care for Ada.

What did Dijkatra like? Pascal?

ALGOL 60. https://en.wikipedia.org/wiki/Edsger_W._Dijkstra#Compiler_co...:

”Dijkstra was known to be a fan of ALGOL 60, and worked on the team that implemented the first compiler for that language. He was closely involved in the ALGOL 60 development, realisation and popularisation.”

Also: Haskell and pascal over C++ and Java (https://www.cs.utexas.edu/users/EWD/transcriptions/OtherDocs...)

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#148
post #72

This article promotes a popular misconception of the programming situation for defense projects in the 1970s. There may have been "hundreds of specialized programming languages" in existence that could be used, but just a handful actually predominated. Most aeronautical projects were done in JOVIAL. I've talked about this history with engineers from the 1960s-70s. They did not regard the introduction of Ada as a good…

Many of the 'programmers' of those days lacked the sophistication and education to appreciate Ada. Just the mojo required to print an integer (having to instantiate a generic) was considered complicated Ada was also very slow to compile, on the order of 10 times slower than Jovial. (my experiences) Avionics systems back then were tiny. Jovial usually ran on a 16 bit processor. Ada enabled a certain maturity and corre…

> Just the mojo required to print an integer (having to instantiate a generic) was considered complicated

That sounds complicated to me, in 2019 with 25 years of C++ experience. (And of course C++ error message sprouting mysterious stdlib templates also seems complicated to me).

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#149
post #88
post #72

This article promotes a popular misconception of the programming situation for defense projects in the 1970s. There may have been "hundreds of specialized programming languages" in existence that could be used, but just a handful actually predominated. Most aeronautical projects were done in JOVIAL. I've talked about this history with engineers from the 1960s-70s. They did not regard the introduction of Ada as a good…

Welp, there's my rabbit hole for the week. I've never heard of JOVIAL before, and it looks like there's lot of interesting stuff here. Thank you!

While you're down there, you might as well check out Coral-66.

Re: Why Ada Is the Language You Want to Be Programming Your Systems With

#150
post #32

> Ada code controls rockets like the Ariane 4 and 5, many satellites, and countless other systems where small glitches can have major consequences. A somewhat amusing endorsement given that the infamous failure of the maiden launch of the Ariane 5 due to series of interconnected software bugs - a reminder perhaps that the choice of implementation language does not automatically make for a reliable system.

I don't think that there is any language around that claims that just because it compiles/can be interpreted that is "reliable". Can you point out a single one that guarantees you won't have logic errors? Rust et. al. are good at eliminating very common issues like memory leaks and concurrency, I've never read in the documentation where it said you won't have issues.
Post reply on HN