@live questions

Dibyendu Majumdar mobile at majumdar.org.uk
Sun Nov 22 11:08:54 UTC 2020

On Sunday, 22 November 2020 at 07:22:22 UTC, Walter Bright wrote:
> On 11/21/2020 6:28 PM, Dibyendu Majumdar wrote:
>> a) I understand on its own @live is only part of what Rust 
>> does? Rust has lifetime annotations and I believe it can track 
>> memory allocation across a graph of objects and ensure there 
>> is no leak etc.
> Rust has an additional capability of specifying which function 
> argument lifetime gets attached to the return type, whereas 
> @live just takes the tightest lifetime of the supplied 
> arguments. This was discussed a while back, and this extra (and 
> optional) specification does not appear to add much value. We 
> can always add it later if it turns out to be critical.

Hi Walter, are you aware of the explicit lifetime annotation 
facility in Rust?


This seems critical to allow correct lifetime calculations in a 
graph of objects.

I read in DIP1000 that there is an automatic lifetime calculation 
when 'scope' storage class is used? However does that work with 
nested object graphs?

Rust had to have explicit annotations I believe as automated 
calculations are not sufficient.

More information about the Digitalmars-d mailing list