▲ | sensen7 5 days ago | |||||||||||||||||||||||||||||||
>In that era you actually did need to "fight" to get obviously correct code to compile because the checking is only looking at the lexical structure. NLL's final implementation (Polonius) hasn't landed yet, and many of the original cases that NLL were meant to allow still don't compile. This doesn't come up very often in practice, but it sure sounds like a hole in your argument. What does come up in practice is partial borrowing errors. It's one of the most common complaints among Rust programmers, and it definitely qualifies as having to fight/refactor to get obviously correct code to compile. | ||||||||||||||||||||||||||||||||
▲ | steveklabnik 5 days ago | parent [-] | |||||||||||||||||||||||||||||||
> What does come up in practice is partial borrowing errors. For some people. For example, I personally have never had a partial borrowing error. > it definitely qualifies as having to fight/refactor to get obviously correct code to compile. This is not for sure. That is, while it's code that could work, it's not obviously clear that it's correct. Rust cares a lot about the contract of function signatures, and partial borrows violate the signature, that's why they're not allowed. Some people want to relax that restriction. I personally think it's a bad idea. | ||||||||||||||||||||||||||||||||
|