DIP1000: Scoped Pointers

Walter Bright via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Aug 12 12:50:36 PDT 2016


On 8/12/2016 5:24 AM, Nordlöw wrote:
> On Wednesday, 10 August 2016 at 20:35:23 UTC, Dicebot wrote:
>> The first DIP has just landed into the new queue. It is a proposal from
>> language authors and thus it bypasses usual nitpicking process and proceeds
>> straight to requesting community (your!) feedback.
>
> Thanks for all the work.
>
> One remarks. I guess `RefCountedSlice` should infer access permissions of
> `payload` and `count` to allow
>
>     RefCountedSlice!(const(T))
>
> right? Is that beyond the scope of the DIP?

In order for ref counting to work, and because D doesn't support borrowing, the 
compiler will have to be aware of ref counting. This DIP is necessary for ref 
counting to work, but is not sufficient, because it doesn't cover how the 
compiler semantics will work with ref counting.


More information about the Digitalmars-d-announce mailing list