|
Java fills a particular niche (code with an emphasis on readability) which is not addressed by Groovy or Clojure and arguably not addressed by Scala. I'd say Go is the biggest competition for that niche as a language, although it's not JVM, it does fix many warts with how Java handles inheritance/polymorphism without sacrificing readability and simplicity. Groovy is slow as a 1-legged dog. (we use it to fill the shell/perl niche a lot but it is slow, effectively you're doing reflection lookups every time you call a method in Groovy). The dynamicness makes it better for scripting or web programming, though, where you don't care as much about performance. Scala is the JVM's C++, a giant pile of overlapping features, supported by an advanced and very slow compiler that yields fast bytecode. Case classes, funny operator overloading, lots of additional syntax for collection manipulation. They're giving you more expressiveness at a cost of readability and language complexity. (This is an opinion, some may disagree). Clojure is really awesome but most dev shops will have an easier time with imperative programming models. Ultimately, not changing in 8 years isn't fundamentally bad, and Java isn't that bad at all as a language if you avoid things like EJB and Hibernate, and if you're not looking for a dynamic language like Ruby and dissapointed by Java not being Ruby. You might just disagree with the tradeoffs. |
I think Java suffers from too many search results (yes thats a thing). I suppose if you want to learn Java today you simply google it, and find tons of people trying to solve the N+1 hibernate problem on stackoverflow, or some other common annoying enterprisey issue, and so you start reading up on JCPs and EE apis. If that is your introduction, I can understand why people end up going "what is this shit?". The reality of course is that there are many subcultures within the Java community and that many of them are anti cruft api as well which is how innovation comes to the Java world.