RSS feed [root] /weblog /java /discussion




login:

password:

title search:




 


Mon Feb 11 03:47:44 GMT 2013

idea of improving java language



These look interesting, worth to take a look:

1) Auto null checking: http://www.jroller.com[..]ebourne?entry=adding_auto_null_checks_to
I don't think this is a good idea as I don't think there is a way can handle default object reference more generic then NULL. However, I would like to have a way to customize NULL behaviour (or default NULL object). Say, for String, I will think empty string ("") is same as NULL. Thus, I would like to have define something like:

public final class Strinig {
null {
return "";
}
// the rest of string implementation
}

Then the default reference of String, rather than point to NULL, now it point to an empty String.

2) Add closure to Java: http://www.jroller.com[..]ebourne?entry=adding_closures_to_java_or
Not much comment, it is something nice to have but I don't think really add a lot of value, just like java5 foreach loop.

3) Auto casting: http://jroller.com[..]lebourne?entry=adding_auto_casts_to_java
I guess generic already does this?

Of course, there are still some other problem on some people's mind, like:
http://www.onlamp.com/lpt/a/3691
http://nice.sourceforge.net/safety.html

On the other hand, somebody don't like to change java language as it probably make your code less portable. http://www.eclipsezone.com/eclipse/forums/t54318.html

4) Some idea of useful util language - http://closingbraces.net/2007/03/05/strangelets/

5) API for adding feature - http://www.theserverside.com[..]s?track=NL-461&ad=636686&thread_id=49035

A lot more other idea - http://blog.jooq.org/2013/02/04/java-if-this-were-a-better-world/

Drop extends - http://www.javaworld.com[..]at-if-java-8-dropped-extends.html?page=2


(google search) (amazon search)
second
download zip of files only