DIP77 - Fix unsafe RC pass by 'ref'

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Apr 12 00:17:03 PDT 2015


On 4/11/2015 4:33 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm at gmx.net>" wrote:
> On Saturday, 11 April 2015 at 09:41:07 UTC, Walter Bright wrote:
>> On 4/11/2015 2:28 AM, "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm at gmx.net>" wrote:
>>> It's not acceptable that it happens behind the user's back. Costly operations
>>> must be explicit.
>>
>> Don't know of a better solution.
>
> How about this?
>
> http://wiki.dlang.org/User:Schuetzm/scope3#.40safe-ty_violations_with_borrowing
>
> Btw, I also made other changes: No implied scope for @safe functions, no
> overloading on scope (instead postblit and destructor are skipped), and added a
> terminology section (rather important!).

A quick read of this suggests it is doing the Rust model of only one mutable 
reference at a time. Is this really viable with D?


More information about the Digitalmars-d mailing list