DIP1000: The return of 'Extend Return Scope Semantics'

Dennis dkorpel at gmail.com
Sat Jun 12 22:23:45 UTC 2021


On Saturday, 12 June 2021 at 19:12:27 UTC, Ola Fosheim Grøstad 
wrote:
> There should be some way for an ADT to state that objects they 
> produce have the same lifetime as themselves.
>
> So if I had a linked list wrapper. And you call 
> ```wrapper.find_node(…)``` then the wrapper object should be 
> able to signal that the returned node has the same lifetime.

That sounds like `return scope`, as long as you wrap the linked 
list by value and not by pointer.


More information about the Digitalmars-d mailing list