3 ms·
Java doesn't force you to do either of those, but it allows it, and doing so has been standard programming advice in Java for at least a decade. See item 13, "
by twic 5y ago
Java doesn't force you to do either of those, but it allows it, and doing so has been standard programming advice in Java for at least a decade.
See item 13, "Favor immutability", in Effective Java, the bible of Java programming, published in 2001:
https://www.pascal-man.com/navigation/faq-java-browser/java-concurrent/Effective_Java.pdf https://www.pascal-man.com/navigation/faq-java-browser/java-...
I can't find a concrete citation for "makes illegal states unrepresentable" (does anyone know the history of this phrase?), but it was certainly part of conversations i was having in 2012.
- bachmeier 5y ago> Java doesn't force you to do either of those, but it allows it, and doing so has been standard programming advice in Java for at least a decade. "You can do that" and "enforced by the compiler by default" are pretty different.
- marshray 5y ago"Make illegal states unrepresentable" is usually attributed to Yaron Minsky of Jane Street. This video shows it at 28:02. https://blog.janestreet.com/effective-ml-video/ https://blog.janestreet.com/effective-ml-video/ https://www.youtube.com/watch?v=-J8YyfrSwTk https://www.youtube.com/watch?v=-J8YyfrSwTk