ModularM
Modular15mo ago
5 replies
Nagaraj Hegde

Mojo documentation says "The Mojo compiler uses lifetime values to track the validity of references.

Specifically, a lifetime value answers two questions:What logical storage location "owns" this value?Can the value be mutated using this reference?

If so, why call it as lifetime? Rather call it as 'refscope' or 'reftype' or something like that. the term 'lifetime' i think confusing when used to describe a reference. Or is there any reason which I'm missing. May be my understanding is limited, I'm pretty new to this. Thanks.
Was this page helpful?