Monday, January 19, 2009

Upgrade Java to 1.5 (at least), Please

I can't believe software is still being created using Java 1.3 (or older) and deployed on systems running Java 1.3. If at all possible, it's time to move forward people. At least upgrade to Java 1.5 (marketing: Java 5) as this is a huge leap forward over 1.3 and is supported by most tools and environments I come across. I wish everyone was using Java 1.6, but that might be asking too much.

Following are some reasons to upgrade to Java 1.5:
  • The latest JVMs perform much more efficiently.
  • Assert facility -- allows programmers to make statements about what they believe their program is doing and quickly uncovers misconceptions.
  • Generics -- allows much enhanced type safety (at compile time, as opposed to runtime), and eliminates casting.
  • Enhanced for loops -- eliminates error prone indexing of for loops and loops that are easier to understand.
  • Auto boxing and unboxing -- eliminates manual conversion between primitives and class types and results in cleaner and easier to read code.
  • Type safe enumerations -- much cleaner, easier to use, and safer than current techniques of using a combination of constant ints, strings, and arrays.
  • Regular expressions -- very, very useful for parsing and validating strings.
  • Static import -- less typing and cleaner code
  • Chained exceptions -- better error reporting and reduced chances of losing exception information.
  • Logging API -- very useful for server applications.
  • Larger API to work with including:


    • JDBC (database connectivity) updates.
    • New classes for threading (concurrency).
    • New IO classes.
    • New classes for converting between strings and various types.
    • New XML processing classes, including XPath (very useful).
    • New security classes.
    • New Java 2D drawing and image IO framework.
    • New printing API.
    • Lots of changes to Swing/AWT.
    • New collection classes and interfaces.
All of the above features lead to much enhanced programmer productivity, safer code, and cleaner code. Personally, I have been using them for many years and find it very difficult to code productively without them. I'm sure as other developers take advantage of these new features, they will feel the same.