Ruling out arbitrary cost copy construction?
Walter Bright
newshound2 at digitalmars.com
Wed Oct 6 10:58:49 PDT 2010
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. I was very reluctant to even put in things like this(this), and the
only thing that forced the issue was the need to support reference counting.
More information about the Digitalmars-d
mailing list