Open giann opened 1 year ago
Hard big YES. Not only that "others" are doing it for years now, but enforcing immutability on a compiler level brings a lot of safety out of the box.
It may eventually lead to questions of "borrowing & ownership" (arrived in Swift 5.9, present in Rust since v1) but that's another subject.
Imho, this should be by default.
Enforcing immutability should be relatively straightforward. Implementing this should also pave the way to resolve/implement:
Should things be immutable (and private) by default?