Ruling out arbitrary cost copy construction?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Oct 29 10:40:39 PDT 2010


On 10/29/10 12:18 CDT, dsimcha wrote:
> == Quote from Andrei Alexandrescu (SeeWebsiteForEmail at erdani.org)'s article
>> To recap:
>> 1. Arbitrary cost copy construction:
>> + Makes value types easy to define: just hook the copying code into
>> this(this)
>> + Is familiar to programmers coming from C++
>> + If it fails, fails early, not surprisingly during a later operation
>
> BTW, I don't see why failing during a variable assignment is any less bad than
> failing during any other seemingly innocuous operation.

One problem is that copying is often implicit and as such more difficult 
to see with the naked eye.

Andrei


More information about the Digitalmars-d mailing list