On 06/10/2010 17:57, dsimcha wrote:
Vote++. IMHO the problem with arbitrary cost copy construction is that
abstractions that are this leaky don't actually make people's lives simpler.
Abstractions (like value semantics) are supposed to make the code easier to
reason
about. When an abstraction forces you to think hard about things as trivial as
variable assignments, I think it's better to either scrap the abstraction and
require all copying to be explicit, or use a less leaky abstraction like
reference
counting/COW.
I agree with this as well.
But I'm still wondering if the original copy construction problem
couldn't be solved in some other way.
--
Bruno Medeiros - Software Engineer