4 ms·
I'm curious as to the lifetime annotations. This is essentially the language designer's intent to say "place a marker on this data field such that the compiler
by CrimsonCape 2y ago
I'm curious as to the lifetime annotations. This is essentially the language designer's intent to say "place a marker on this data field such that the compiler can trace the usage of the field to insure it is not accessed (before,after) the memory is released."
Therefore, the lifetime is expressed via an additional abstraction requiring the associated language syntax, compiler design, additional rulesets, etc.
Why would the same concept not be expressible as it's own data type, that would then be passed as data? In this case, you remove the additional abstraction. It seems like Jai is going that route, where you pass an arena type instance around and interact with it.
- steveklabnik 2y agoData is at run time, but types (which lifetimes are) are at compile time. You may remove an abstraction, but you'd also lose efficiency.