Ruling out arbitrary cost copy construction?

Rainer Deyke rainerd at eldwood.com
Sat Oct 30 21:14:36 PDT 2010


On 10/30/2010 21:56, Andrei Alexandrescu wrote:
> Walter and I discussed the matter again today and we're on the brink of
> deciding that cheap copy construction is to be assumed. This simplifies
> the language and the library a great deal, and makes it perfectly good
> for 95% of the cases. For a minority of types, code would need to go
> through extra hoops (e.g. COW, refcounting) to be compliant.

For what it's worth, I've used the ref-counting/COW style even in C++.
C++ might not assume that copy construction is cheap, but it certainly
performs better when it is.


-- 
Rainer Deyke - rainerd at eldwood.com


More information about the Digitalmars-d mailing list