Idea: Ownership & lifetime escape analysis by variables in reference to

rikki cattermole rikki at cattermole.co.nz
Sun May 29 08:44:05 UTC 2022


On 29/05/2022 7:42 PM, Ola Fosheim Grøstad wrote:
> Simple stuff like a queue of size two? How do you know what it contains?

I've been thinking back on my past thought experiments, how I use to 
turn this on was with scope as a type qualifier.

For non-owning data structures like queues, you would never 
intentionally mark that as scope since its entries will always have 
separate lifetimes from that of the data structure itself.

So even if implemented, this may not be a general solution that we are 
looking for.


More information about the Digitalmars-d mailing list