Hacker News new | past | comments | ask | show | jobs | submit login

My understanding is that the semantics are exactly the same, but it’s just possible for the checker to match your intent more tightly.

For example, in lexical lifetimes, this fails:

    let x = &mut foo;
    
    if x.bar() {
        baz()
    } else {
        foo.consume() // takes foo by value
    }
It will complain that you’ve used `foo` while it is borrowed by `x`, even though a human can easily tell that `x` is already irrelevant by that point. NLL would accept this (I believe).



Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: