4 ms·
It's not religious. Memory safety is a thing. If by politics you mean the government: they only got started recommending memory safe languages once it became cl
by nailer 1y ago
It's not religious. Memory safety is a thing. If by politics you mean the government: they only got started recommending memory safe languages once it became clear that foreign actors were going to keep exploiting C / C++ vulnerabilities.
https://www.theregister.com/2024/11/08/the_us_government_wants_developers/ https://www.theregister.com/2024/11/08/the_us_government_wan...
- johnisgood 1y agoSo why are we not using Ada / SPARK?
- __s 1y 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 1y 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 1y 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 1y 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 1y 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 1y 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 1y 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 1y 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 1y ago
- Klonoar 1y agoTrump administration also rescinded this I believe.
- steveklabnik 1y agoNot particularly. Some of this stuff started under the last Trump administration as well. We'll see.
- nailer 1y agoIt's all sides of government. Edit: all links now fixed. ____ (generated, but with references) # U.S. government guidance on memory-safe languages Here's the list of links to U.S. government documents recommending memory-safe programming languages for cybersecurity. 1. *White House ONCD - "Back to the Building Blocks" (Feb 2024)* - Encourages developers to use memory-safe languages like Rust, Python, Java, C#, Go, Swift to reduce vulnerabilities. - Link: https://bidenwhitehouse.archives.gov/wp-content/uploads/2024/02/Final-ONCD-Technical-Report.pdf https://bidenwhitehouse.archives.gov/wp-content/uploads/2024... 2. *CISA, NSA, FBI, and partners - "Memory Safe Roadmaps" (Dec 2023)* - Recommends memory-safe languages (C#, Go, Java, Rust, Ruby, Swift) and roadmaps to eliminate memory issues. - Link: https://www.cisa.gov/resources-tools/resources/case-memory-safe-roadmaps https://www.cisa.gov/resources-tools/resources/case-memory-s... 3. *NSA - "Software Memory Safety" (Nov 2022)* - Advises using memory-safe languages like C#, Go, Java, Ruby, Swift to avoid C/C++ vulnerabilities. - Link: https://media.defense.gov/2022/Nov/10/2003112742/-1/-1/0/CSI_SOFTWARE_MEMORY_SAFETY.PDF https://media.defense.gov/2022/Nov/10/2003112742/-1/-1/0/CSI... 4. *CISA - "Urgent Need for Memory Safety" (Sep 2023, updated Dec 2023)* - Promotes memory-safe languages as part of the Secure by Design campaign. - Link: https://www.cisa.gov/news-events/news/urgent-need-memory-safety-software-products https://www.cisa.gov/news-events/news/urgent-need-memory-saf... 5. *White House press release - "Future Software Should Be Memory Safe" (Feb 2024)* - Calls for memory-safe languages to reduce cyberattack surfaces. - Link: https://bidenwhitehouse.archives.gov/oncd/briefing-room/2024/02/26/press-release-technical-report/ https://bidenwhitehouse.archives.gov/oncd/briefing-room/2024... 6. *NIST - "Safer Languages" (updated Oct 2022)* - Highlights memory-safe languages like Rust and Ada to prevent common vulnerabilities. - Link: https://www.nist.gov/itl/ssd/software-quality-group/safer-languages https://www.nist.gov/itl/ssd/software-quality-group/safer-la...
- nailer 1y agoWhy is HN downmodding this? We're programmers, surely we all agree memory safety is a thing? Infosec people surely all agree that foreign actors have been exploiting vulnerabilities for the last three decades? I'm not complaining about the downmods, I'm just weirded out - it's like a music forum disagreeing that flutes are real.