Alex Miller lives in St. Louis. He writes code for a living and currently work for Terracotta Tech on the Terracotta open-source Java clustering product. Prior to Terracotta he worked at BEA Systems and was Chief Architect at MetaMatrix. His main language for the last decade has been Java, although Alex have been paid to program in several languages over the years (C++, Python, Pascal, etc). Alex has posted 43 posts at DZone. You can read more from them at their website. View Full User Profile

JSR 666: Solving Java's Problems

02.13.2008
| 12604 views |
  • submit to reddit

You may be interested in some new developments in JSR-666 (the JSR from hell). This is an excellent JSR containing many important enhancements for Java. Maybe we can even get it into Java 7.

This JSR contains the following list of recommendations:

Many props to the JSR 666 expert group: Alan Green, Charles Miller, Mike Cannon-Brookes, and AJ Fitzpatrick.

Published at DZone with permission of its author, Alex Miller.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Tags:

Comments

cowwoc replied on Wed, 2008/02/13 - 5:22pm

I was about to post a comment telling you off before I clued in ;)

 

All I've got to say is that it's a good thing that Java doesn't allow identifiers to be declared using Unicode characters. I'll spare you the headache of debugging code with Russian or Japanese comments. I'd hate for the actual code to use these characters :)

Bruno Laturner replied on Wed, 2008/02/13 - 10:25pm in response to: cowwoc

Actually...

Letters and digits may be drawn from the entire Unicode character set, which supports most writing scripts in use in the world today, including the large sets for Chinese, Japanese, and Korean. This allows programmers to use identifiers in their programs that are written in their native languages.

 

Loren Kratzke replied on Thu, 2008/02/14 - 12:46am

Geeze, I thought this was serious for a minute. Had me worried.

Rick Ross replied on Thu, 2008/02/14 - 8:02am

Brilliant!

David Sills replied on Sat, 2008/02/16 - 2:49pm

Loved the SchrödingerException! although I did think it might be better defined as: This exception can exist as either till a point where the exception is caught, at which time the thread running the handler is found to be either dead or alive.

Alexander Beloturkin replied on Sat, 2008/02/16 - 4:27pm

>> Eliminate NullPointerExceptions. Remove null and require that all variables have a valid value.

I don't think that this is a good idea. Null is very important.

Artur Biesiadowski replied on Sat, 2008/02/16 - 8:21pm in response to: Alexander Beloturkin

Naaah.

For strings iuse "" instead of null. For primite wrappers, null is just messing around with autoboxing - and double has NaN which can be very well used to represent tricky values. When you have Person class, instead of using null to indicate that Cat has no owner, you can have special marker instances like GENERIC_GRAVEYARD_OLD_LADY to indicate it is fed by unknown person, or FURRY_GRIM_REAPER to indicate it is soon going to die from not being fed.



Obviously removing null won't happen anytime soon, because Java 7 is sponsored by letter N.

Alexander Beloturkin replied on Sun, 2008/02/17 - 4:15am in response to: Artur Biesiadowski

"" and null is not the same. This is completly different things. About the null marker, you right, this is one the possible solution, but if for every null in  program we start to use some kind of markers, it can make our code unmaintainable. And in reality we will have many problems instead of NPE.

Any way I agree with you that this is not happen in nearest future. 

Artur Biesiadowski replied on Sun, 2008/02/17 - 6:21am in response to: Alexander Beloturkin

I thought that I'm obvious enough, but it seems not.

Alexander, this entire thread is a satire. None of the posts above, including mine, are serious. There are some subtle hints indicating it, including "Geeze, I thought this was serious for a minute" from Loren, but it is probably time to state it yet more clearly. 

Alexander Beloturkin replied on Sun, 2008/02/17 - 7:14am in response to: Artur Biesiadowski

Yes, I understand this from first post.

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.