RFC: scope and borrowing

Rikki Cattermole via Digitalmars-d digitalmars-d at puremagic.com
Mon Aug 25 03:06:08 PDT 2014


On 25/08/2014 1:14 a.m., "Marc Schütz" <schuetzm at gmx.net>" wrote:
> In the "Opportunities for D" thread, Walter again mentioned the topics
> ref counting, GC, uniqueness, and borrowing, from which a lively
> discussion developed [1]. I took this thread as an opportunity to write
> down some ideas about these topics. The result is a rather extensive
> proposal for the implementation of borrowing, and its implementations:
>
> http://wiki.dlang.org/User:Schuetzm/scope
>
> This is not a real DIP, but before I put more work into formalizing it,
> I'd like to hear some thoughts from the languages gurus here:
>
> * Is this the general direction we want to go? Is it acceptable in general?
> * Is the proposal internally consistent?
> * How big would the effort to implement it be? (I suspect it's a large
> amount of work, but relatively straightforward.)
>
> [1] http://forum.dlang.org/thread/lphnen$1ml7$1@digitalmars.com

Have you considered what happens when you cast away scope?
I didn't read anything about that, unless I missed something.

I do have to ask this, because what if you wanted to optionally return a 
scoped reference?


More information about the Digitalmars-d mailing list