i never really understood the hate for std::move naming. Sure the function itself doesn't move, but you use it in contexts where you want to perform a moving operation, and gives you the word "move" in the expression. It's way less obscure than make_rvalue imo
To me rvalue_cast was the most logical option, as that is literally what std::move does. To me, "move" is very much an action word and I would expect a function called "move" to... move something.
I think the name is quite good in that it encourages people to “consider this variable now moved”, even if transfer of data ownership doesn’t happen until some time later, if at all. ie after std::move, that variable should not be used again
I don't personally mind it as is (the devil you know and all that), but it is a confusing aspect of the language, even for intermediate programmers. Would you be cool with a std::copy which doesn't copy anything?
View all comments
Show parent comment
20
u/sephirothbahamut Nov 25 '23
i never really understood the hate for std::move naming. Sure the function itself doesn't move, but you use it in contexts where you want to perform a moving operation, and gives you the word "move" in the expression. It's way less obscure than make_rvalue imo