4 ms·
&mut is kind of gross syntactically anyways; another thing that would have clarified this would have been to rename & to &shared, which has symmetry.
by tptacek 5y ago
&mut is kind of gross syntactically anyways; another thing that would have clarified this would have been to rename & to &shared, which has symmetry.
- ReactiveJelly 5y agoNah, I like having immutable syntax be shorter. It makes idiomatic code shorter than code that does a lot of mutating
- saghm 5y agoAgreed! I also like that declaring a mutable binding is extra code beyond a regular binding rather than something the same (or shorter). At least for me, making things immutable by default and then only relaxing it when necessary leads to code that tends to be less buggy, and I suspect this might be true for others as well.
- the_duke 5y agoRust is already an ugly language. Having &shared plastered all over your code base would be ... suboptimal. Not everything in a language needs to be 100% self descriptive. I think the designers arrived at a good tradeoff.
- Quekid5 5y agoThat's kind of point, tho... I feels gross because it should?