Ruling out arbitrary cost copy construction?

Simen kjaeraas simen.kjaras at gmail.com
Sun Oct 31 08:54:29 PDT 2010


Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org> 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.
>
> I'm looking for more feedback from the larger D community. This is a  
> very important decision that marks one of the largest departures from  
> the C++ style. Taking the wrong turn here could alienate many  
> programmers coming from C++.
>
> So, everybody - this is really the time to speak up or forever be silent.

I am almost certain you're doing the right thing by assuming cheap copy
construction, but I have no good arguments to back me up. Hence my holding
my breath and waiting, thus far.

-- 
Simen


More information about the Digitalmars-d mailing list