Ruling out arbitrary cost copy construction?

Emil Madsen sovende at gmail.com
Wed Nov 10 12:29:13 PST 2010


Make the syntax ugly? - so you cant avoid seeing it?

On 29 October 2010 19:40, Andrei Alexandrescu <SeeWebsiteForEmail at erdani.org
> wrote:

> 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
>



-- 
// Yours sincerely
// Emil 'Skeen' Madsen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20101110/cc8ae567/attachment.html>


More information about the Digitalmars-d mailing list