3 ms·
Interesting; I certainly wouldn't consider C++ constructor/destructor like semantics and manual tracking of object ownership in the code as automatic memory man
by varjag 9y ago
Interesting; I certainly wouldn't consider C++ constructor/destructor like semantics and manual tracking of object ownership in the code as automatic memory management. But regardless, the point stands.
And yes it's a consequence of a design goal, I said as much. The outcome however isn't beautiful enough to feel smug about the rest of programming languages.
- kosinus 9y agoDo you consider C++ RAII as manual memory management?
- mathw 9y agoRust doesn't have C++ constructor/destructor semantics. It doesn't require manual tracking of object ownership. You just have to say when you're passing ownership and when you aren't, and the compiler takes care of the rest. It's automatic memory management without runtime accounting or a garbage collector, which means Rust doesn't need a runtime at all.
- varjag 9y ago> It doesn't require manual tracking of object ownership. You just have to say when you're passing ownership and when you aren't […] Call it whatever you want, but there are languages where you don't have to "pass ownership" manually for every frigging thing.
- iknowstuff 9y agoAnd you won't see them being used for systems programming because of their overhead. So without Rust, we'll be stuck with stupid, avoidable security vulnerabilities at the base of all our software, forever. On top of that, Rust's ownership system also prevents data races and none of those other languages are capable of that.
- creatornator 9y agoI'd say Java, a GC'ed language, is used for systems programming quite often.