3 ms·
I'm happy to see the focus on productivity. I saw the long awaited Non-Lexical Lifetimes tentatively mentioned in there, and I can only hope this will help mov
by tux3 10y ago
I'm happy to see the focus on productivity.
I saw the long awaited Non-Lexical Lifetimes tentatively mentioned in there, and I can only hope this will help move things forward, since it's pretty frustrating spending time fighting the borrow checker and refactoring correct code that really ought to run as-is.
Cheers and happy 2017 to the Rust project!
- flukus 10y agoAs far as fighting the borrow checker goes, how familiar are you with more functional style programming approaches, mainly immutability? I'm extremely new to rust so I don't know if fighting the borrow checker is in my near future or something I will largely avoid.
- hyperpape 10y agoMutability makes it worse, but there are at least some issues with borrowing that have nothing to do with mutability. If your experience is with garbage collected languages, I suspect you'll encounter errors that surprise you.
- stable-point 10y agoCould you provide an example where the borrowing would cause issues for immutable data? I'm still learning Rust, but I thought the fact that you could have as many immutable borrows as possible would limit what errors the borrow checker could throw at you.
- hyperpape 10y agoThis is embarrassing, but I'm now second-guessing whether what I wrote was accurate. Sorry. In penance, here are some links: https://www.reddit.com/r/rust/comments/5ny09j/tips_to_not_fight_the_borrow_checker/ https://www.reddit.com/r/rust/comments/5ny09j/tips_to_not_fi... https://m-decoster.github.io//2017/01/16/fighting-borrowchk/ https://m-decoster.github.io//2017/01/16/fighting-borrowchk/
- stable-point 10y agoFantastic! Thanks a lot in any case. I do find the image of "fighting the borrow checker" is quite harmful to how people view Rust. As those links state, an important aspect of teaching Rust is educating people about why the borrow checker complains, so that they might adjust their mental model.