Re:Two Years with Rust
by WesternStar on Monday March 23, 2020 @01:19PM
(#22666219)
I guess I watched the back to basics c++ series on move semantics and its not really all that bad. I did struggle with it beforehand though. I've never worked in C++ tbh. I does take the 2 hours but you have it when you're done. https://youtu.be/St0MNEU5b0o
[ Parent
| on HN ]
Re:Two Years with Rust
by quietbritishjim on Monday March 23, 2020 @01:30PM
(#22666366)
Really? You can tell off the top of your head what the difference between an xvalue and a glvalue is? Which function has higher precedence in the overload list out of foo(string&) and foo(string&&)? (Note that's not a const string&!) That these are so obvious to you that there's no chance you would make a mistake about them when you're in a hurry trying to solve an actual problem that has its own complexities rather than playing games with C++'s unnecessary complexity? The one where foo(std::move(x)) doesn't necessarily move x is a particular killer (although at least it only causes a performance problem rather than noticable change in behaviour).
I have worked with C++ for a hell of a lot more than 2 hours since C++11 came out (the first version with move semantics) and worked with many others that have too, and I can tell you that "once you have it you're done" is just not true. I fully understand all the concepts but I can still make mistakes.
Re:Two Years with Rust
by WesternStar on Monday March 23, 2020 @02:44PM
(#22667241)
Is there more? Yea. Do you need for most code ? No. Also I lied I have coded professionally in C++.