Beginning this issue, Allen Holub joins SD Times as our Java Watch columnist. A leading architect, consultant and instructor in C/C++ and Java, he has written eight books, including "Taming Java Threads" (Apress).



Email    print   
May 1, 2004 —  (Page 1 of 2)
JAVA WATCH:

Missed Opportunities

By Allen Holub

May 1, 2004 -

Java's "Tiger" release (version 1.5) is due out later this year. I'll have many things to say about the changes that Sun has made to the language, but in this column, I want to address some of the downside. Just to head off the flames, bear in mind as you read this column, that I like Java. I program in it almost exclusively and think that it's a great language for what it does. I am not the enemy.

Sun, however, blows it on occasion, and it seems reasonable to discuss the downside as well as the upside. I don't intend to trash 1.5 so much as to give you a heads-up so that you can be thinking about how you might want to use (or not use) some of the new functionality.

The new Tiger release is noteworthy in that it introduces significant features to the language itself. Some of these features (among them, enums, a new "foreach" form of the for statement, and a set of concurrency utilities to help you get multithreaded applications under control) are long overdue. Other features (static imports) are hideously bad ideas. The largest addition to the language is generics: a C++-template-like addition to Java.

I can't possibly talk about all the new stuff in a single column, so I'll discuss the new pros and cons of these features gradually, over the course of several issues. Another resource is the article "J2SE in a Nutshell," found atjava.sun.com/developer/technicalArticles/releases/j2se15.

Before talking about Tiger, however, let's talk about politics. Several of the new features in Java 1.5 are there because Microsoft has added similar features to its C# language. I really hate the idea of a compiler-level arms race. Language features should be added because they improve the language, not because the other guy does it.

Take autoboxing (please). With autoboxing, if you use a primitive-type object (like a double) in an object-like context (like a Collection insert), the compiler creates an object wrapper (like a Double), initializes it from the primitive, and uses the resulting object. Autoboxing is in Java because Microsoft put it in C#. Unfortunately, autoboxing is far from the best solution to the problem of primitive types being treated inconsistently; it would be vastly better to make the primitives honest-to-god classes.




Pages 1 2 


Share this link: http://sdt.bz/27844
 
Most Read Latest News Blog Resources

Add comment


Name*
Email*  
Country     


  • Comment
Loading




close
NEXT ARTICLE
CA Technologies Completes Acquisitions of Interactive TKO and Watchmouse B.V.
Companies Expand Options for Helping Enterprises and Service Providers Address the Complexity of ‘Cloud Choice’ Read More...
 
 
 
 
News on Monday
more>>
SharePoint Tech Report
more>>


   

 
 

Download Current Issue
FEBRUARY 2012 PDF ISSUE

Need Back Issues?
DOWNLOAD HERE

Want to subscribe?


 
blogs tab
Are you at risk for burnout?
Burnout is a severe problem and it can strike at any time. Here's how to tell if you are nearing the edge.
02/09/2012 02:16 PM EST

Agility, mom, and apple pie
If we're to evaluate the state-of-the-art in software development, we should start with the values espoused in the Agile Manifesto.
02/07/2012 11:57 AM EST

RIM woos developers with free tablet
How do you get more apps ported to the BlackBerry PlayBook? By giving every developer a free tablet, of course!
02/04/2012 01:57 PM EST

GitHire: Use Headhunters to Find Your Perfect Programmer
Are you a hiring manager tired of scouring the job boards? Check out this new service that will find 5 people interested in your jobs.
02/03/2012 12:17 PM EST

Facebook claims hacker cred
Facebook's SEC S-1 filing form includes a short essay on the Hacker Way by Mark Zuckerberg himself.
02/02/2012 08:26 AM EST

Ryan Dahl steps down
Ryan Dahl, creator of Node.js, steps back from his position as gatekeeper for the project.
02/01/2012 04:58 PM EST

 
Events calendar tab
2/13/2012 to 2/16/2012
Santa Clara
TechWeb

2/26/2012 to 2/29/2012
San Francisco
BZ Media

2/27/2012 to 3/2/2012
San Francisco
RSA

3/4/2012 to 3/7/2012
Las Vegas
IBM Tivoli

3/5/2012 to 3/9/2012
San Francisco
TechWeb