I don’t usually just write blog entries linking to other people’s writing, but Ed Burnette gets it totally right: adding new language features to the Java language hurts the Java platform. Look, there are two huge advantages to the Java platform:
- The JVM is supported on many platforms
- The wealth of Java libraries, tools, and applications
As Ed points out so well, language extensions hurt efforts to get JVMs universally available on all platforms. Writing Java code that only targets version 1.5 language features prevents it from running on GNU gcj/CLASSPATH and on operating systems that do not have a reliable 1.5 JVM. Except for a few projects for my own use only, I make a point of setting IntelliJ to target version 1.4.x JVMs. I obviously like to run 1.5 JVMs to pick up the runtime improvements, but for serious work, I still target the 1.4.x language.