Leandro Lucarella wrote:
Do you remember when people asked for default immutability? I do :)
Yes, but it would break every other line of code already written in D.
I like the idea of making x := y an alias for immutable x = y (or even
enum x = y). That would make this style much more attractive without
breaking backward compatibility as immutable-by-default would do.
Actually,
const x = y;
is better than immutable, because if y is a T*, it cannot be implicitly
converted to immutable, while it can be implicitly converted to const.