News for hackers. Stuff that matters.
Re:Explore the ownership system in Rust by simfoo on Tuesday January 20, 2015 @03:35AM (#8915982)
Am I crazy to say I prefer the ownership and copy/move system of C++11? It feels much easier to reason about but then again maybe that's just because I'm more familiar to it.
Re:Explore the ownership system in Rust by dan00 on Tuesday January 20, 2015 @05:57AM (#8916359)
> It feels much easier to reason about but then again maybe that's just because I'm more familiar to it.

I'm a professional C++ programmer for a decade and have started to look into Rust, and there's no way that C++ is easier to reason about.

There's no automatic copying of complex data in Rust, you can't move something away and later use it again, you can't invalidate interators and this list goes on and on.

At the beginning you have to get used to the borrow system of Rust, learn the idioms, but after that, it really seems to be in a lot of parts a better C++.

Re:Explore the ownership system in Rust by exDM69 on Tuesday January 20, 2015 @06:30AM (#8916448)
> Am I crazy to say I prefer the ownership and copy/move system of C++11?

Yes you are, and the only reason for that is that Rust's system is checked by the compiler, C++ is not.

It's really easy to screw up with C++, forgetting to make something noncopyable and then causing double free or use after free issues.

Re:Explore the ownership system in Rust by sanxiyn on Tuesday January 20, 2015 @03:49AM (#8916010)
It's easier (well, certainly simpler) and less powerful. The system certainly can be simplified a lot if you don't need memory safety.
Re:Explore the ownership system in Rust by twic on Tuesday January 20, 2015 @06:35PM (#8920475)
Perhaps it's easier in the sense of "less arduous", but ultimately not easier in the sense of "more productive". The C++ model is less spiky and painful, but just doesn't let you be as confident about your program as the Rust model.