You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"NLL" is a kind of an umbrella proposal for all kinds of extensions to Rust's lifetime system (actually, it's worse - several independent borrow-checking/typesystem extensions are also a part of the umbrella). It's also a bad name because it only says what it's not, rather than what it is.
This is annoying because the new Rust lifetime system is interesting enough in itself, I think even from a type-system POV (it certainly isn't the everyday boring dataflow that lexical lifetimes are).
I think a good name for the new lifetime system would be "lazily-constrained lifetimes"/LCL - the key point is that all lifetime constraints are lazy and don't take place until they are used.
We also need a "marketing name", at least for the feature-gate (surely we are going to use a feature gate for this?). Maybe NLL has caught enough to be the feature-gate name?
I'm thinking of using the NLL feature gate as the feature gate for MIR borrowck as soon as we can get it usable, and adding the "borrowck" features of the NLL refactor (and maybe even 2-phase borrows) as we go along.
The text was updated successfully, but these errors were encountered:
Yeah, NLL is not the best name, though it fits in the Rust tradition (IMHTWAMA anybody?). This is sort of an "internal" feature -- i.e., once the feature gate is gone, nobody will ever "name it", it's just the way the borrowing system works, right (much like IMHTWAMA)? So I'm not sure how important the name is. But I guess it's worth a bikeshed!
I'm not sure yet what I think about LCL. I don't really see anything here as "lazy" -- I guess you mean lazy in that a borrow only constrains things while it may yet be used (and no longer)? I think of the "lazy" terminology in computer science as usually meaning a delayed start, not an "early" end -- maybe a better fit for rust-lang/rfcs#2025 (or two-phase borrows).
In all seriousness, everyone has been calling this feature "non-lexical lifetimes" for so long I think choosing any other name would be more confusing than it's worth, especially since (as Niko said) I doubt we'd ever refer to this feature by name after it becomes the norm.
But if we had to pick a "better" name for whatever reason, I'd pick something with "CFG" in it. The problem with NLL as a name is that it's strictly negative and content-less. If I understand this RFC correctly the "content" of the solution is essentially "do borrow checking against subsets of the control-flow graph in MIR instead of curly brace-delimited scopes in the AST". A name like "CFG Lifetimes" or "Control Flow Lifetimes" or "CFG-based Lifetimes" seems like it would get that point across fairly well.
"NLL" is a kind of an umbrella proposal for all kinds of extensions to Rust's lifetime system (actually, it's worse - several independent borrow-checking/typesystem extensions are also a part of the umbrella). It's also a bad name because it only says what it's not, rather than what it is.
This is annoying because the new Rust lifetime system is interesting enough in itself, I think even from a type-system POV (it certainly isn't the everyday boring dataflow that lexical lifetimes are).
I think a good name for the new lifetime system would be "lazily-constrained lifetimes"/LCL - the key point is that all lifetime constraints are lazy and don't take place until they are used.
We also need a "marketing name", at least for the feature-gate (surely we are going to use a feature gate for this?). Maybe NLL has caught enough to be the feature-gate name?
I'm thinking of using the NLL feature gate as the feature gate for MIR borrowck as soon as we can get it usable, and adding the "borrowck" features of the NLL refactor (and maybe even 2-phase borrows) as we go along.
The text was updated successfully, but these errors were encountered: