5 ms·
I'm a javascript developer. if mutable is expensive, and should be difficult then "let mut" makes more sense. var looks like a default to me, not a special ca
by rover0 5y ago
I'm a javascript developer.
if mutable is expensive, and should be difficult then "let mut" makes more sense.
var looks like a default to me, not a special case that needs care.
- leshow 5y agoNitpick: "expensive" may be the wrong word there, to me that implies some kind of runtime cost. The stated reason for the keyword is that it forces users to think a little bit more about mutability. You may want do this because safe mutability requires exclusive ownership.