2 ms·
`unique_ptr` is like `Box<T>` (the old `~`).
by steveklabnik 13y ago
`unique_ptr` is like `Box<T>` (the old `~`).
- pohl 13y agoWell this is all very humbling. I'm a mostly "managed language" weenie at the moment, but I swear I've read the phrase "ownership semantics" in reference to something in this neck of the C++ woods. Rust is shaping up to pass the Alan Perlis test quite handily as a language worth studying.
- steveklabnik 13y agoNo worries. :) Yes, see, in C++, you still need to think about ownership, the compiler just can't help you out. One way of thinking about Rust is "C++, but the compiler understands ownership and memory lifetime." https://github.com/mozilla/rust/wiki/Rust-for-CXX-programmers https://github.com/mozilla/rust/wiki/Rust-for-CXX-programmer... is a bit outdated, but you may enjoy giving it a glance.
- DanWaterworth 13y agoFor the uninitiated (like me 20 seconds ago): A language that doesn't change the way you think about programming is not worth learning. - Alan Perlis