|
|
|
|
|
by ltbarcly3
473 days ago
|
|
Yes, everyone agrees with you. The claim you responded to was that you should have to be explicit, because it is very easy to unintentionally copy. For example, it is easy to copy when there is never more than one live pointer to a datastructure. It's easy to copy when you allocate a resource in a function and return it, which makes the original an orphan which is then immediately freed. It's extremely easy to make a mistake which prevents move from working and you have to go back and carefully check if you want to be sure. It should be trivial to just say "move this" and if something isn't right it's an error at compile time, rather than just falling back to silently being wasteful. |
|