4 ms·
I’ve not seen any languages that does not require meticulous care to avoid runtime bugs. Type checking and lifetime ownership eliminate some, but not all of the
by skydhash 3mo ago
I’ve not seen any languages that does not require meticulous care to avoid runtime bugs. Type checking and lifetime ownership eliminate some, but not all of them.
- fooster 3mo agoSo less meticulous care then?
- skydhash 3mo agoNot really, as you always need to check back on your assertions, especially at the boundary points where information about types and ownership are more axiomatic than the result of logical inference.
- fooster 3mo agoSure, but there are less assertions to check. The surface area and boundaries are smaller and more limited.
- nicce 3mo ago> Type checking and lifetime ownership eliminate some, but not all of them. They actually remove certain classes completely. E.g. lifetime ownership in Rust removes all bugs related to the reason why it is in the code syntax (a.k.a. lifetime markers remove use-after-free completely in Rust.)
- mungaihaha 3mo agoAlmost like how RAII in C++ does it?
- nicce 3mo agoRAII in C++ is optional and not enforced everywhere. It certainly helps if you use it. In Rust you can't turn it off.
- mungaihaha 3mo agounsafe?