3 ms·
Java cannot express immutability. `final` is not transitive, so nothing stops an unrelated change in code to break something that was immutable earlier. Same wi
by pkolaczk 3y ago
Java cannot express immutability. `final` is not transitive, so nothing stops an unrelated change in code to break something that was immutable earlier. Same with Golang.
- rbehrends 3y agoYou can express immutability simply by making all instance variables private and not providing any methods to modify them.