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…
Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
61–70 of 203 posts
Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
#62Earlier quoted context omitted.
Honestly, I wonder why Pascal doesn't dominate, too. Safer than C while still just as powerful, "teaching language" (easy to learn) but used for serious software (as you note, Apple used it for system programming). FPC is amazingly feature rich.
Kernighan wrote about the limitations of Pascal in "Why Pascal Is Not My Favorite Programming Language": https://www.lysator.liu.se/c/bwk-on-pascal.html Note, however, that he wrote this in 1981; these days, when someone speaks of Pascal, they usually speak of a dialect based on Turbo or Object Pascal, which appeared in 1983 at the earliest and address many of Kernighan's concerns. tl;dr the Pascal of the 1970s was a…
But that said, it's strange that Kernighan wrote the above article ("Why Pascal Is Not...") in 1981, i.e. three years after the introduction of UCSD Pascal and Modula-2.
Does anybody here know the background of that article? Why was Kernighan feeling the need to defend C against a 13-year old language which was already not in use anymore in its original form at the time the article was written? Was C under attack and risking to lose its popularity?
Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
#63Earlier quoted context omitted.
> Why is ADA not adopted more broadly? Productivity, and the general labour intensity. Formal verification is not critical for the lion share of all software, and people obviously would like to save man hours by not dealing with it. Second is the availability of developers. Not many people even now what formal verification actually is, let alone see rationale for learning verification driven development.
You can use ADA without the Formal verification part. I would say at least for embedded systems it's more productive than C because it has a much stronger and expressive type system. E.g. if you do a lot of fixed-point math, ADA's type system can express it. ADA has proper arrays, with bounds checks. ADA has built-in multithreading. ADA is a very productive language for embedded systems, much more so than C. But peop…
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").
Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
#64Not 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…
The usual alternatives are to statically allocate all your memory, to convince yourself it's safe to use Unchecked_Deallocation, or to use a GC/refcounting library. Static allocation is usually not a problem for special-purpose embedded control applications: e.g., your airplane has two wings and one set of landing gear and its position is described by three coordinates, and you'll never need more of those. You probably want to avoid malloc anyway for both predictable performance and not having to worry about whether your allocation will succeed. But if you're writing, say, a CSS engine or a grep replacement or a terminal emulator, that approach won't work.
GC works for those use cases, but there are a number of excellent memory-safe GC'd languages already in wide use for many things, like Python and Java. You can get very good steady-state performance with Java, sometimes higher than equivalently-complex C, but it's still not a language you'd want to implement loadable libraries or OS kernels in.
Rust solves the problem of making writing high-performance, C-drop-in-replacement code feel much like (definitely not exactly like :) ) working in a higher-level language like Python or Java, including the memory-safety parts of that experience. Ada addresses memory safety, but for most of the use cases people are excited about Rust for, they want the combination of those features. For things like flight control software, picking something extremely mature (usually the companies in these press releases have existing Ada code from previous projects dating back decades) is valuable and having safe dynamic allocation isn't really a requirement.
Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
#65Not 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…
EDIT: Oh and the price tag.
Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
#66Earlier quoted context omitted.
You can use ADA without the Formal verification part. I would say at least for embedded systems it's more productive than C because it has a much stronger and expressive type system. E.g. if you do a lot of fixed-point math, ADA's type system can express it. ADA has proper arrays, with bounds checks. ADA has built-in multithreading. ADA is a very productive language for embedded systems, much more so than C. But peop…
> 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").
Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
#67I remember the first lecture introduced a little graphical rocket simulation in Ada and us students would write code to land the rocket. I liked that.
Then i think the semester after this they introduced us to Haskell (ghc = Glasgow Haskell Compiler). Another good course but one i wished i’d paid more attention to at the time!
Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
#68Ada 95 was the language for 1st year Comp Sci at the University of Glasgow at the start of the millennium. There was a small revival in Ada at that time. I remember the first lecture introduced a little graphical rocket simulation in Ada and us students would write code to land the rocket. I liked that. Then i think the semester after this they introduced us to Haskell (ghc = Glasgow Haskell Compiler). Another good c…
Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
#69Not 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…
I could get Turbo C or Turbo Pascal, there was no Turbo Ada. It has never had a compiler / IDE that made it easy to write Windows or Mac applications.
Are you talking about the Eighties? GNAT is available for free since the nineties and the GPS IDE is available for free on all relevant platforms since nearly twenty years; even before there were IDE like alternatives for free.
Re: Airbus Chooses GNAT Pro Ada for Development of Unmanned Aerial System
#70Earlier quoted context omitted.
You can use ADA without the Formal verification part. I would say at least for embedded systems it's more productive than C because it has a much stronger and expressive type system. E.g. if you do a lot of fixed-point math, ADA's type system can express it. ADA has proper arrays, with bounds checks. ADA has built-in multithreading. ADA is a very productive language for embedded systems, much more so than C. But peop…
> 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").