Hacker News new | ask | show | jobs
by dehrmann 7 days ago
It's becoming clear that humans have no business writing C/C++ without Rust-level tooling around it to prevent these things.
1 comments

SPARK Ada has proven this is solvable for decades. rust brings nothing new to the table.
SPARK Ada does exist since the late 1980s (although not open source for a long time) and does solve a lot of security problems that plague C/C++.

But for use-after-free, from the beginning, the solution was not to have pointers in the language at all; Ada does have pointers and Ada.Unchecked_Deallocation.

Obviously dynamic memory allocating does have useful applications, so after Rust 1.0 was released, SPARK Ada added pointers and an explicitly Rust-inspired ownership model.

"Verification of Programs with Pointers in SPARK", 2020 https://dl.acm.org/doi/10.1007/978-3-030-63406-3_4

"Proving heap-manipulating programs with SPARK", 2021 https://av.tib.eu/media/53376

https://alb-lang.org/wiki/SPARK_Ada

the pointer and heap manipulating points are very fair points indeed. i just hate when people act like rust is a totally new concept. (heck not to mention stuff like eiffel!)
I think it did. Borrow checking and ownership. The last influenced access types in SPARK. Besides that, Rust probably is better suited for application with threads and dynamic memory allocation.
I doubt I've executed a single Ada program in my life. I see Rust every day.

Clearly it's bringing something to the table, even if not technical.

shrug, depends on which industry exposure you have. but ill concede w the recent mandates and climate they're moving to rust from ada/spark and c/c++. one could argue if nothing more than the improved popularity and tooling (except compile times god damn)