Hacker News new | past | comments | ask | show | jobs | submit login

Ada doesn't have the same memory management safety without a garbage collector that Rust does.



Ada has memory management safety, even though it is not the same paradigm as Rust. Affine typed pointers might be a tad more powerful than Ada's scoped pointers and limited types, but they're still not powerful enough to express everything useful - cyclic structures in general are a very big hole in Rust's type system in that regard.

And then in both language, you can use unsafe when you need more power. So Rust might (and I say might, because I have no clear proof of that yet) be a tad more powerful in the safe subset, but it's not in a different class.


Indeed Ada has different memory management model, though equally safe.


I've coded in Ada. Storage pools are not as safe as Rust's affine type system. For one it's a lot easier to leak memory with Ada, since they're mainly built off of reference counting.


Pedantic: memory leaks are memory-safe, despite generally being undesirable.


You're totally right, but yeah, I tend to roll it in to the same category since I consider the denial of service associated with memory leaks to be as bad as stricter memory unsafety. (And to be very pedantic I said 'memory management safety', not just 'memory safety').


Ada uses a garbage collector for the free store (or just uses unsafe code if it's disabled). Ada's memory management model is not really different from any other typical language.


This is the first time I've ever heard of Ada being garbage collected. Neither ARM, Barnes' nor Ben-Ari's books, nor GNAT manual say that there is supposed to be a garbage collector (quite the contrary, the books say that GC is allowed, but usually not present).

Where did you get your information from?




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: