2 ms·
It sounds like you're agreeing with my point to be honest. The problem isn't Rust or the borrow checker; it's simply checking lots of things on interfaces. The
by IshKebab 2y ago
It sounds like you're agreeing with my point to be honest. The problem isn't Rust or the borrow checker; it's simply checking lots of things on interfaces. The more you check, the more you'll have to change when you get it wrong.
Rust happens to check quite a lot. I imagine it is similar for things like monads in Haskell, or probably formal languages like Lean and Dafny... but I have no experience of that so it's just a guess.
- sfink 2y agoNo, I'm not agreeing with you. You're agreeing with me. Wait a minute... :-) Sorry, somehow I managed to quote the portion of your message that I was agreeing with. You just said it more concisely than I could. The aspect I disagree with is whether brittleness to change is more due to the complexity of the borrow checker vs interfaces with very constrained types. I mean, the complexity of the borrow checker definitely factors into it, especially with how late it runs (as you said) and the fact that it's all or nothing, which makes it hard to change things incrementally. But (imho) the borrow checker is less complex than, say, the rules around C++ constructor variants. And RVO/NRVO. And name lookup. And definitely less complex than undefined behavior. I'd rather memorize the borrow checker than those. They contribute to some amount of brittleness to change, especially when monkeying with move constructors, but in practice it seems far less than Rust. I really think it's more about the specificity of types in the language. I should probably mention that I still think it's a good tradeoff for many of the types of programs I write, but it is a tradeoff. Anyway, this is all more just a realization that you sparked in me. It's ok if we, uh, disagree to agree.