DIP69 - Implement scope for escape proof references

via Digitalmars-d digitalmars-d at puremagic.com
Wed Dec 10 07:15:58 PST 2014


On Tuesday, 9 December 2014 at 21:58:48 UTC, deadalnix wrote:
> That why i say they are linked. I don't think your way of 
> stating
> it contradict what I said.
>
> scope allow for manipulation of data without owning them.
> Whatever the owner is (be it the stack frame or anything else)
> doesn't really matter here.

It does when you return parts of it, like if you pass in a binary 
tree and return a node. Which you have to be able to do for the 
concept to make sense.

When you solve issues in language design you should address the 
hard issues first, because the easy issues will then tend to 
resolve themselves if the design is good. If you start with "the 
low hanging fruit" you end up with pointless special casing… D is 
already in that landscape and should try hard not to sink deeper 
into the muddy waters.

I posit that if you have a solution for ownership/retaining 
references then the solution for scope will come from this as a 
side-effect.


More information about the Digitalmars-d mailing list