I'm Quitting Java.
...and probably the JVM as well.
I've been looking for a new language for a long time now...
Java has been my primary language for years, but not because I'm fond of its syntax. The thing Java has going for it is a really large ecosystem. Lately, however, I find the disadvantages of the language outweighing the benefits.
My biggest gripes are:
- Overly verbose syntax.
- Lack of functional constructs.
- Terrible dependency management.
- Even worse mechanism for launching Java processes.
- No interactive REPL.
- Takes a lot of effort to get simple shit done.
I'm also growing less fond of the ecosystem.
Many of the important frameworks written in Java are just not fun to use. For example, Hadoop seems to defy any sort of existing conventions/technologies Java did have in favor of it's own configuration, RPC, and extension facility (making it extremely hard to extend). The MapReduce client was overly verbose (particularly configuring a Job), and the documentation was certainly lacking when you ran into trouble (went beyond simple examples). The Apache HTTP Components Client is another example of an essential, but frustrating framework. Until version 4.2 (when the fluent API was introduced), making an HTTP Request involved a bizarre amount of work (instantiating multiple objects) just to get a simple document as a string. For many popular languages, this was as simple as a single method call from a utility package.
I don't know why, but the ethos of Java API development seems to be:
Feature rich, complex frameworks.
Where many other languages prefer:
Simple, opinionated, task-oriented frameworks.
If the API's not bad, it's poorly documented and supported.
So you're left reading source code and unit tests to figure out how it all works. Often, I think this is reasonable enough of an expectation for open source software (to not be throughly documented). In practice, however, you'll find test cases that are either too low level or simplistic to demonstrate the API. In other languages, when lacking in documentation, I find it can be easier to interpret API's due to the consistency of language conventions and idioms.
Despite it's age, Java lacks a lot of these conventions.
This may be due to a number of factors: breadth and diversity of the developer community (academics, scientists and software engineers), lack of a centralized figure head (like Linus Torvalds or Guido van Rossum), and competing organizations and philosophies. Who knows? What I can say is that Java doesn't benefit from inconsistency.
The ecosystem may actually have become too large and diverse.
Having a ton of frameworks is awesome for curious developers wanting to try something new, but it's terrible if you're a manager looking to hire someone with significant experience with a particular stack you're deploying into production. For our company, it's basically forced us to hire generalists and then train them on the job to our particular technology stack (which is ok until one of your senior engineers decides to debate technology selection based on his/her own personal preferences).
J2EE, Spring Framework, the independents, and the interlopers.
Java literally has the equivalent of the American political system, where party affiliation with a particular enterprise stack can inspire angst amongst peers and limit potential opportunities for job seekers. It's not good enough to be a Java Engineer. When I hire, I look for people who love the Spring Framework because that's my enterprise stack, and I don't want to have long arguments about why we chose that technology.
Don't get angry, pick a new JVM language.
The natural reaction by most JVM enthusiasts to "bucking Java" is to propose using one of the new JVM-based languages: Scala, Clojure, Ceylon, or Kotlin. I've put a fair amount of time learning a couple of these languages (namely Scala and Clojure), but none of them have really repurposed my Java skills. Scala is probably the closest to Java, and it does introduce many of the functional aspects I've been missing, but it's an amazingly complex and often incomprehensible language. The more I write in Scala, the more I dislike it.
Clojure is a much more elegant language than Scala, but I don't think I'm prepared to make the mindset change necessary to be any good at the language (I like my hybrid OOP+Functional paradigm). I've tried a number of times to get into Clojure, but I just can't.
Unfortunately, the transition away from Java may be a long process.
Despite my decision to move away from the platform, Java still plays a large role in the enterprise. My divorce from the platform will not occur overnight, but I feel like it's time to at least start investing a lot of effort in finding a new language.
Stumbling my way through the great wastelands of enterprise software development.