DIP69 - Implement scope for escape proof references
Steven Schveighoffer via Digitalmars-d
digitalmars-d at puremagic.com
Fri Dec 5 07:27:41 PST 2014
On 12/4/14 4:24 AM, Walter Bright wrote:
> http://wiki.dlang.org/DIP69
>
> Despite its length, this is a fairly simple proposal. It adds the
> missing semantics for the 'scope' storage class in order to make it
> possible to pass a reference to a function without it being possible for
> it to escape.
>
> This, among other things, makes a ref counting type practical. It also
> makes it more practical to use other storage allocation schemes than
> garbage collection.
>
> It does not make scope into a type constructor, nor a general
> type-annotation system.
>
> It does not provide an ownership system, though it would complement one.
Can we take a step back here?
I read many people's comments and I understand only about half of them.
Can someone who knows what this new feature is supposed to do give some
Ali Çehreli-like description on the feature? Basically, let's strip out
the *proof* in the DIP (the how it works and why we have it), and focus
on how it is to be used.
I still am having a hard time wrapping my head around the benefits and
when to use scope, scope ref, why I would use it. I'm worried that we
are adding all this complication and it will confuse the shit out of
users, to the point where they won't use it.
-Steve
More information about the Digitalmars-d
mailing list