Live data from Hacker News

Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

manufacturing.net

71–80 of 203 posts

Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

#71
post #66
post #63

Earlier quoted context omitted.

> ADA has proper arrays, with bounds checks. Not only that, but you can also opt out at compile-time if you need, for performance reasons. You also have (optional) runtime bound-checking for scalar values (aka "integers"), and you can even specify the bounds yourself (like "A number between 3 and 17").

Proper bounds checked arrays, possible to opt out, integers with bounds: Turbo Pascal had that too.

Ada has that and many more features that help in creating great embedded software.

Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

#72
post #64
post #6

Not an expert in ADA, but after playing around with it for a while, I don't know why this language doesn't get more praise. It seems to solve a lot of the memory problems Rust solves, albeit in a different way. Its first-class arrays and strong type system seem to go a long way into not having to deal with pointers often, for example. These "features" today would likely be considered part of "a better C", except that…

Ada doesn't have compile-time-safe dynamic memory allocation and deallocation (i.e., tracking a pointer so that you know statically that it's no longer used elsewhere in the function that frees it). Rust does it through the lifetime system, which is based on Cyclone, which long postdates Ada. The usual alternatives are to statically allocate all your memory, to convince yourself it's safe to use Unchecked_Deallocatio…

As described in another post Ada has features to avoid the problem Rust want's to solve in most cases. You can e.g. allocate varable length arrays on the stack.

Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

#73

Does anyone use Ada for general purpose programming, like for where one might otherwise use Python, Go, nodejs, or something like that? Is it used for any low-reliability areas?

For example this project: https://github.com/ghdl/ghdl

Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

#74
post #66
post #63

Earlier quoted context omitted.

> ADA has proper arrays, with bounds checks. Not only that, but you can also opt out at compile-time if you need, for performance reasons. You also have (optional) runtime bound-checking for scalar values (aka "integers"), and you can even specify the bounds yourself (like "A number between 3 and 17").

Proper bounds checked arrays, possible to opt out, integers with bounds: Turbo Pascal had that too.

Key word in that sentence: had. I picked up Ada essentially because it seemed to me a more actively maintained Pascal. (I've since learned that Free Pascal/Lazarus might not be as dead as it first appeared.)

Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

#75
post #72
post #64

Earlier quoted context omitted.

Ada doesn't have compile-time-safe dynamic memory allocation and deallocation (i.e., tracking a pointer so that you know statically that it's no longer used elsewhere in the function that frees it). Rust does it through the lifetime system, which is based on Cyclone, which long postdates Ada. The usual alternatives are to statically allocate all your memory, to convince yourself it's safe to use Unchecked_Deallocatio…

As described in another post Ada has features to avoid the problem Rust want's to solve in most cases. You can e.g. allocate varable length arrays on the stack.

Ada also lets you create ad hoc local reference types and disallows references escaping beyond the scope of their type. This is an insanely powerful combination for ensuring references do not leak beyond where they are supposed to.

Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

#76
post #29

Earlier quoted context omitted.

Programming Rust by O'Reilly, haha.

I get why this is downvoted but it is solid advice: in C you absolutely have to track ownership and lifetimes of pointers and pointees, but the compiler is free to not help you in any way. Learning rust will make you a better programmer. Thus, the recommendation is very good.

Learning any language makes you a better programmer

Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

#77
post #75
post #72

Earlier quoted context omitted.

As described in another post Ada has features to avoid the problem Rust want's to solve in most cases. You can e.g. allocate varable length arrays on the stack.

Ada also lets you create ad hoc local reference types and disallows references escaping beyond the scope of their type. This is an insanely powerful combination for ensuring references do not leak beyond where they are supposed to.

Yes, thanks. There are a lot more examples. I wish someone with deep knowledge and real experience in both Ada and Rust would write a side-by-side comparison covering all relevant aspects, including more recent developments like https://www.adacore.com/papers/safe-dynamic-memory-managemen....

Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

#78
post #76
post #29

Earlier quoted context omitted.

I get why this is downvoted but it is solid advice: in C you absolutely have to track ownership and lifetimes of pointers and pointees, but the compiler is free to not help you in any way. Learning rust will make you a better programmer. Thus, the recommendation is very good.

Learning any language makes you a better programmer

Using* any language and writing non-trivial programs.

Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System

#80
post #50
post #32

Earlier quoted context omitted.

My first IDE was Turbo Basic in 1989. Changing from Type Domain is 0..255; to Domain is 0..65535; Is quite easy.

"Turbo had a great IDE" in no way refutes that Ada suffered from not having an IDE.

Except it did, that is how Rational Software was born.

https://datamuseum.dk/wiki/Rational/R1000s400

Eventually that experience was moved into UNIX workstations, like everyone else trying to capitalise on their market.

The "I don't need IDE" culture is more related to languages born in UNIX culture.

Post reply on HN