Closed
Description
Issue #1273 proposed let mut
for mutable locals and mut
for mutable fields. let mut
is more verbose than a single keyword and also breaks column alignment. People rightly didn't like the idea of var
for mutable field declarations. But I think nobody suggested the idea of using var
for mutable local declarations and mut
for mutable field declarations:
let x = 7; // declaration of immutable variable x
var y = 7; // declaration of mutable variable y
type point = { mut x: int, mut y: int }; // declaration of mutable record type
Dave
Metadata
Metadata
Assignees
Labels
No labels