Opportunities for D
Andrei Alexandrescu via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jul 10 06:55:54 PDT 2014
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).
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.
Andrei
More information about the Digitalmars-d
mailing list