News for hackers. Stuff that matters.
Re:Memory Safety for Skeptics by bluGill on Monday November 10, 2025 @04:43PM (#45881336)
Ada has been around for years. The approach to memory safety isn't as strong as Rust, but it is a lot strong than C or C++. C++ is also adding a lot of memory safety, it is a lot easier to bypass than it is in Rust (though I've seen Rust code where everything is marked unsafe), but you still get some memory safety if you try.

All benchmarks between Ada, C, C++, and Rust (and others) should come down to a wash. A skilled programmer can find a difference but it won't be significant. A skilled C++ programmer wouldn't be using unordered_map so it is unfair to point out you can use something bad.

Re:Memory Safety for Skeptics by vlovich123 on Monday November 10, 2025 @05:03PM (#45881544)
It has but you need spark too to avoid the runtime overhead. And I haven’t seen adoption of Ada in the broader industry so I wouldn’t pick it based on that. I would need to understand why it remains limited to industry’s that mandate government certification.

> A skilled C++ programmer wouldn't be using unordered_map so it is unfair to point out you can use something bad.

Pretending defaults don’t matter is naive especially in a language that is so hostile to being easy to add 3p dependencies (even without that defaults matter).

Re:Memory Safety for Skeptics by pjmlp on Wednesday November 12, 2025 @07:34AM (#45899385)
Rust has plenty of runtime overhead, or do you think Vec is fully static checked?

There are other examples for other data structures.

Re:Memory Safety for Skeptics by BeetleB on Monday November 10, 2025 @05:25PM (#45881789)
> A skilled C++ programmer wouldn't be using unordered_map so it is unfair to point out you can use something bad.

C++ isn't my primary language. Pray tell - what's wrong with unordered_map, and what's the alternative?

Re:Memory Safety for Skeptics by jcranmer on Monday November 10, 2025 @05:36PM (#45881904)
std::unordered_map basically specifies a bucket-based hashtable implementation (read: lots of extra pointer chasing). Most high-performance hashtables are based on probing.
Re:Memory Safety for Skeptics by tptacek on Monday November 10, 2025 @06:35PM (#45882360)
Bluntly: exactly why does Ada matter, at all? The code footprint of software (1) written in Ada and (2) of concern when we talk about memory safety has measure zero. Is Ada better than C++? It turns out, I don't have to care: to go from C++ to Ada, one needs to rewrite, and if one is going to rewrite for memory safety, they're not going to rewrite to Ada.
Re:Memory Safety for Skeptics by bluGill on Monday November 10, 2025 @09:40PM (#45883576)
If I'm going to rewrite I'm going to look at if formal proofs offer me anything, something ada can give. Ada is tiny I'll grant, but it has always been there.