I spent the last 2 hours dealing with C++ value categories in templated code.
Could someone please kill me?

Most people focus on the #BorrowChecker when they compare #RustLang and #CPP, but I feel that it should also be highlighted how much more intuitive (and a lot saner) it is to deal with moving/copying/referencing in Rust.

@soulsource I like C++, I enjoy the language but there are so many caveats to remember, one slight change in the source code leads to a copy you didn’t mean to make and you don’t notice right away cause you’re testing it by running it a few times not under load, so later down the line when you get slowdown you tear your hair out

@boethiah Indeed. I just found a move-semantics bug that has been in the project for months, and the only reason it was never encountered was because nobody used the broken function with types that had actual move support...

After fixing the code and adding some SFINAE magic to make it easier to extend (that's what made me look at it in the first place), I am now uncertain if it really doesn't move things it shouldn't, so I'm afraid, I now have to add tests for that...

@soulsource Always a bad day when you need to get SFINAE on your side. It makes it worse for me as I like using Rust but having to shift back to C++ it feels like dealing with a really old car, one that works and will get you A to B but you need to perform maintenance every 5 minutes or you risk the car dying completely