Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`unique_ptr` is like `Box<T>` (the old `~`).


Well 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.


For 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


No 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-programmer... is a bit outdated, but you may enjoy giving it a glance.




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

Search: