Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

give this current proposal a better name #43

Open
arielb1 opened this issue Aug 22, 2017 · 3 comments
Open

give this current proposal a better name #43

arielb1 opened this issue Aug 22, 2017 · 3 comments

Comments

@arielb1
Copy link

arielb1 commented Aug 22, 2017

"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.

@nikomatsakis
Copy link
Owner

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).

@arielb1
Copy link
Author

arielb1 commented Aug 24, 2017

But there is a delayed start - a lifetime constraint only applies when it is evaluated.

@Ixrec
Copy link

Ixrec commented Aug 24, 2017

Since you asked for a bikeshed...

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants