Opportunities for D
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 10 10:56:09 PDT 2014
On 7/10/2014 6:55 AM, Andrei Alexandrescu wrote:
> On 7/10/14, 12:21 AM, Walter Bright wrote:
>> On 7/10/2014 12:03 AM, deadalnix wrote:
>>> So runtime error or php style better anything than nothing for
>>> something that
>>> can be checked statically...
>>
>> I don't understand your comment.
>
> It's very simple. The semantics you propose is move with the syntax of copy.
> Following the implicit move, the source of it is surprisingly modified (emptied).
Right, that is what I proposed.
> That doesn't work. There is a humongous body of knowledge accumulated in C++
> with std::auto_ptr. That artifact has been quite the show, including people who
> swore by it (!). We'd do good to simply draw from that experience instead of
> reenacting it.
I accept that you're right, but I don't know why. I perused the link you
provided earlier, and wasn't too enlightened.
It was clear from those links that unique_ptr<T> is working successfully - what
is different about that?
More information about the Digitalmars-d
mailing list