Suggestion: "mut", like "let" keyword

I would like to propose a mut keyword that simply provides visual balance to the let keyword.

E.g.

let x = 6
mut thing.value = x

The idea is purely to provide visual balance and make it clear when something mutable occurs; this should act as a reminder to new users that they need to define a variable as mutable in order to mutate it.

It also helps to make it clearer when you’re about to make the mistake of trying to modify a non-mutable reference.

1 Like