Y
Hacker News
new
|
ask
|
show
|
jobs
by
pkolaczk
809 days 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.
1 comments
rbehrends
809 days ago
You can express immutability simply by making all instance variables private and not providing any methods to modify them.
link