3 ms·
I agree with you about the verbosity of Java, it's driving me nuts. Also, overuse of XML in java-related frameworks/platforms etc. I mean, when it gets to the p
by Sandman 16y ago
I agree with you about the verbosity of Java, it's driving me nuts. Also, overuse of XML in java-related frameworks/platforms etc. I mean, when it gets to the point where you have to use complex logic to perform a task, you have to start wondering whether xml is the way to go...
As for overuse of patterns - well, to be honest, I sometimes actually wish that my colleagues would learn some (at least basic) patterns. Quite a large number of them wouldn't know how to implement Strategy, for example.
As for your other points.. I don't know. I think this is debatable. What does too much global state mean? Is having singletons in your application inherently wrong, because they introduce global state? I don't think so. Overuse of singletons (and overuse of any pattern for that matter) is certainly a code smell, but there are simply some situations where singletons are appropriate. Or would you argue that this is true for Java simply because of bad design of the language itself?
What I, personally, dislike about Java is it's really bad handling of lists. You see, as somebody working on Java enterprise projects, I constantly have to do something with lists, I fetch them, sort them, filter them, perform operations on certain elements of the lists etc. And it's incredible how verbose and ugly and littered with for-ifs the code gets. Yes, members of JCP EC, we need those closures, and we need them now.
- grayrest 16y ago> What does too much global state mean? Is having singletons in your application inherently wrong, because they introduce global state? I don't think so. I do. If you have an hour, the following talk by Rich Hickey (clojure) covers philosophy behind global state being the problem. This is not a code talk and he takes his time getting into it so it's not the easiest talk to get into but it does explain the mindset. http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hickey http://www.infoq.com/presentations/Are-We-There-Yet-Rich-Hic... To answer your question more directly: I believe Java's lack of functions/closures lead to excessive factory use, which tend to be singletonish and so you get the set of dependency injection/IoC frameworks that simply don't exist in other languages but exist in Java due to too much global state. There are other symptoms, but this is the first one that came to mind.