3 ms·
So why are we not using Ada / SPARK?
by johnisgood 2y ago
So why are we not using Ada / SPARK?
- __s 2y agoIndeed Ada found popularity for aircraft software Rust is part of a modernized iteration in language design this century Nobody is calling for Ada code to be rewritten in Rust. But at this point you'd want an argument to choose Ada over Rust when it has become more widespread, especially in open source projects Here's someone else's take on your question a few years ago: https://news.ycombinator.com/item?id=28347930 https://news.ycombinator.com/item?id=28347930
- johnisgood 2y agoJust for the curious, Ada is used in these industries: - Avionics - ATM - Space - Rail - Automotive - Defense - Security - Medical https://www.adacore.com/about-ada https://www.adacore.com/about-ada You can find lots of resources here to learn Ada / SPARK: https://learn.adacore.com https://learn.adacore.com or just to see what is up. Alternatively, there are good blog posts, too.
- johnisgood 2y agoI thought I should reply separately to your comment, but I do not see how he got to the conclusion "in other words, if your goal is to write a (say) safe implementation of the DOM that can render real-world web pages while efficiently using memory on a general-purpose computer, Ada is probably the wrong tool for the job.". My only "issue" here would be its verbosity, which is why I choose C still quite often.
- __s 2y agoThey were opining that Ada is unsuitable for fine grained data structures (like Rust being awkward with linked lists) & lacking mature graphics APIs For years I used a C window manager I wrote which was less than 150 lines[1], it can definitely be a terse language. But I've also written pretty tight Rust code for a card game engine & its http server. I don't think Rust is particularly more verbose. Rust code can be artistic too[2] 1. https://github.com/serprex/nobox/blob/master/nobox.c https://github.com/serprex/nobox/blob/master/nobox.c 2. https://github.com/serprex/Kelxquoia/blob/master/src/main.rs https://github.com/serprex/Kelxquoia/blob/master/src/main.rs
- johnisgood 2y agoTo be honest, I have not yet written Rust seriously, so I cannot comment as much on it. I mostly use C, OCaml, Lua, at times Perl, these days. I do not know how much the language would feel like it is getting in the way of "expressing" my thoughts. https://github.com/serprex/nobox/blob/master/nobox.c https://github.com/serprex/nobox/blob/master/nobox.c is definitely terse. :D I get lost just by looking at it; a little bit of refactoring (indentation-wise) would help though.
- mardifoufs 2y agoWhy does it matter, really? I mean sure, ada could've been an alternative language that everyone pushed for using but it kind of missed the boat due to historical circumstances , the context around its early use, etc. It might even be that rust users are just more enthusiastic and have been able to push more... But so what? But why does it matter if the language that has seen some traction in terms of "rewriting software in safer languages" is rust? At that point it becomes even more religious to just reflexively oppose rust because "well why didn't x or y see the same push??"? Again, it really doesn't matter why!
- johnisgood 2y agoThis sounds like a dismissal. It is worth getting rid of the misunderstandings of Ada. It is worth letting people know that safe alternatives to C do exist and have existed long before Rust. You said it yourself that the issue may have been historical circumstances, in which case it should be clarified. Ada has a lot of great things built-in to the language. I especially love its type system and constructs for concurrency. Imagine if it had the hype of Rust, as a better alternative to C (which it easily could be). It goes further than Rust when it comes to safety, there is a reason for why you can find it in critical software. > But why does it matter if the language that has seen some traction in terms of "rewriting software in safer languages" is rust? At that point it becomes even more religious to just reflexively oppose rust because "well why didn't x or y see the same push??"? Again, it really doesn't matter why! If it does not matter, then why not Ada / SPARK indeed? I am sure the whys matter to some extent.
- mardifoufs 2y agoAgain it doesn't really matter imo. There's no reason for ada rewrites to not take place, but I don't seem to come across a lot of community projects aiming at rewriting, say, coreutils in Ada. That's maybe due to the lack of hype (something rust doesn't lack at all). But regardless, I think that most people know and have know that memory safe alternatives have existed for a while.
- johnisgood 2y ago