3 ms·
I don't remember the 'satisfying the borrow checker' phase lasting more than a few weeks. Once you internalize the rules the borrow checker gets out of your way
by sebzim4500 4y ago
I don't remember the 'satisfying the borrow checker' phase lasting more than a few weeks. Once you internalize the rules the borrow checker gets out of your way and it's more of a sanity check.
I think part of the issue is that it wasn't very well explained in the book at the time I started learning rust. This might have improved since.
- amelius 4y agoThe entire way of coding in Rust revolves around satisfying the borrow checker. At some point it may become second nature, but you are still jumping through Rust's hoops, which will make your code full of compromises that would otherwise not exist.
- unrealhoang 4y agoSo does the entire way of coding in any static-typed language, your code is full of compromises that would otherwise not exist in a dynamic-type language. Rust is just another layer of static typing.
- amelius 4y agoYes. It's another level of the same problem. Rust is like a piano where certain keys have been removed so you never play out of key.
- stouset 4y agoYou can pretty much make this same argument about any language higher-level than C.
- unrealhoang 4y agomaybe assembly. Even C can be applied to their argument just fine.
- dralley 4y ago>you are still jumping through Rust's hoops, which will make your code full of compromises that would otherwise not exist. The same can be said in reverse. There are many, many C and C++ codebases that make design compromises and copy data unnecessarily so as not to be utterly hellish to maintain. People meme about "fearless concurrency" but it's true, with Rust you don't need KGB levels of paranoia and attentiveness to write parallel or reference-heavy code. I can write code in Rust I would never be comfortable writing in C/C++ because the language gives me the confidence to not compromise in those areas.