4 ms·
> I could never understand why is immutability not the default in all the popular languages At what point do you shift the blame for bad code from the language
by omegalulw 5y ago
> I could never understand why is immutability not the default in all the popular languages
At what point do you shift the blame for bad code from the language to the programmer?
If you made variables const by default bad programmers will simply mark everything mutable.
The only way you enforce proper constness tags (or mutable tags) is through code reviews and teaching people better. So the default doesn't really matter.