DIP1000: Scoped Pointers

Joseph Rushton Wakeling via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Fri Aug 12 04:12:14 PDT 2016


On Thursday, 11 August 2016 at 22:07:57 UTC, Walter Bright wrote:
> The scheme does not implement borrowing. References to internal 
> data should be returned via 'return ref' or 'return scope', 
> where their usage will be limited to the expression they appear 
> in.

I want to make sure we have the same understanding here: the 
use-case I'm interested in is a data structure that needs to hold 
a reference to data it does not own -- where, obviously, the 
lifetime of the data structure cannot outlive the lifetime of the 
data it references.

Surely this scope proposal ought to address that use-case?


More information about the Digitalmars-d-announce mailing list