3 ms·
It's also worth noting that the "Rust way" often ends up being clearer and better structured, in hindsight. Rust forces you to think through questions of owners
by chc 4y ago
It's also worth noting that the "Rust way" often ends up being clearer and better structured, in hindsight. Rust forces you to think through questions of ownership and identity more than most languages, and a lot of "structuring programs the Rust way" is just expressing these things.
Of course, that's just "often," not nearly "always." There are many valid programs that the borrow checker struggles with, and in those cases, the "Rust way" is just needlessly convoluted. There are many problems for which the most common answer is "just store all this data in a list and use list indices like pointers." (Thankfully there has been a lot of progress on a new borrow checker that's less easily startled.)