4 ms·
There are two sides to any coin. The complexity of the language is a consequence of the complexity of the problem it is trying to solve and the constraints it i
by rapsey 8y ago
There are two sides to any coin. The complexity of the language is a consequence of the complexity of the problem it is trying to solve and the constraints it is operating under.
The borrow checker is not just some crazy torture device that exists for no reason. Criticizing the difficulty of the borrow checker without considering why it exists in the first place is completely misguided.
- garmaine 8y agoFalse dichotomy -- there are always more than two sides to any issue. People find themselves fighting with the borrow checker because their mental model of what they're writing is not what Rust is interpreting. This is probably indicative of two things: (1) their mental model is incorrect in some ways, and (2) Rust's semantics don't map that well onto how we think about systems programming problems. If satisfying the borrow checker makes you think "whoops, that was dumb" then you're in category 1. If it makes you think "aargh, how do I express this in a way Rust will accept?!?" then you're in category 2. With an ideal language category 2 wouldn't exist.
- AnimalMuppet 8y agoOf course, it's very easy to think you're in category 2 when you're really in category 1 but don't see how you're wrong...
- garmaine 8y agoBut are all instances of category 2 actually category 1? That’s a strong claim.
- AnimalMuppet 8y agoIt is, and it's a claim that I didn't make. But even if it were true, I think people won't believe that it's true, because there will be instances where they won't understand the borrow checker's reasoning.
- garmaine 8y agoI think you can understand what the borrow checker is doing and still think it is being too stringent.