3 ms·
A solution to this would be to disallow mutable value types. Then, all methods would _have_ to return a new instance. The compiler implementation could use mut
by cballard 11y ago
A solution to this would be to disallow mutable value types. Then, all methods would _have_ to return a new instance.
The compiler implementation could use mutability behind the scenes for efficiency, while the language exclusively allowed immutable values.