The Artima Developer Community
Sponsored Link

Computing Thoughts
Java 7: Too Little, Too Late?
by Bruce Eckel
August 6, 2011
Summary
One of the things I've loved about Python is that it was built as a community from the beginning. Language design decisions are genuinely discussed and struggled with as a community. But with Java, I've always felt like the adults were telling me what to think.

Advertisement

I just saw Joe Darcy's JDK 7 in a Nutshell talk (9.5 minutes) from O'Reilly OSCON Java 2011. The new features he talked about were a bit of type inference so that you no longer have to repeat yourself in some of the most egregious ways the language formerly forced us to, and switching on String.

If this had happened 12 years ago, I would have felt like the language was on the right track, trying to make things easier and cleaner for the programmer. Instead, I feel like we got over a decade of being told why all the choices made in Java were the best way and that we should just accept and love them (and many did).

Only now, after years of dissatisfaction that led to more succinct and powerful languages on the JVM, do we finally start seeing some of these fundamental improvements. But it seems like they only happened under extreme duress after a lot of resistance. And perhaps these features might be helpful, but I can't see them stemming the flow away from Java towards other JVM languages for those that no longer want to struggle with the limitations of Java.

For example, in Scala the decision to use type inference is at the core of the language, not an afterthought. So defining an object is about as clean a process as you could hope for. Adding a little inferencing in Java 7 doesn't make a dent by comparison.

With Scala's pattern matching, you can switch on pretty much anything. Someone who is frustrated by the limitations of switching on integral values is not going to see enough of an improvement via string switching.

It's nice that Java is making these improvements. Java made some fundamental shifts in the programming world -- before Java everyone believed that virtual machines and garbage collectors would never be practical, for example. But it seems to me that the world started moving on awhile ago. The productivity and financial benefits of languages like Scala, Groovy, JRuby, Jython and numerous other JVM languages are getting harder and harder to resist.

Talk Back!

Have an opinion? Readers have already posted 64 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Bruce Eckel adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Bruce Eckel (www.BruceEckel.com) provides development assistance in Python with user interfaces in Flex. He is the author of Thinking in Java (Prentice-Hall, 1998, 2nd Edition, 2000, 3rd Edition, 2003, 4th Edition, 2005), the Hands-On Java Seminar CD ROM (available on the Web site), Thinking in C++ (PH 1995; 2nd edition 2000, Volume 2 with Chuck Allison, 2003), C++ Inside & Out (Osborne/McGraw-Hill 1993), among others. He's given hundreds of presentations throughout the world, published over 150 articles in numerous magazines, was a founding member of the ANSI/ISO C++ committee and speaks regularly at conferences.

This weblog entry is Copyright © 2011 Bruce Eckel. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use