3 ms·
I can find points I disagree with on every language here, but this author seems to have quite the bias against Java, so I'll make a few counterarguments. "If y
by chchrutuch 11y ago
I can find points I disagree with on every language here, but this author seems to have quite the bias against Java, so I'll make a few counterarguments.
"If you write Java code that has no side-effects, that doesn't read or change the local object's state, you'll be called a Bad Programmer."
No you won't.
"Java thinks that localised side-effects are cornerstone of good code"
Java doesn't think anything. It's a tool.
"Unfortunately, in practice Java doesn't just try to encapsulate side-effects; it mandates them"
No, it doesn't.
I will say I've worked in Java shops and seen the language used in this way. I've also worked in Java shops and seen people who have read and internalized the messages in Effective Java, especially with regard to handling state, and the codebase looked nothing like what is described in this article. I recommend the author take some time to read that book and keep reminding himself that Java is a generalized tool that can be used in many ways.