Open minds leads to freedom

Communicating my thoughts on software development

Archive for September 22nd, 2009

JDK7 Tackles Java Verbosity

Posted by rnaufal on 22nd September 2009

Interesting article showing some changes on the Java platform to address its verbosity, but keeping code readability safe.
I liked the new Collection’s literals syntax to create lists, sets and maps:

List powersOf2 = {1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024};
Map ages = {"John" : 35, "Mary" : 28, "Steve" : 42};

Although it can be possible to use the DoubleBraceInitialization idiom to initialize collections in a more elegant way, this syntax is very terse and concise.

BTW, as I said before, Scala already has a syntactic sugar to create a literal Map:

val ages = Map("John" -> 35, "Mary" -> 28, "Steve" -> 42)

Maybe this change was taken into account considering the Scala collection literals implementation?

Tags: , , , , , , ,
Posted in Uncategorized | 2 Comments »

A Brief History of Java and JDBC

Posted by rnaufal on 22nd September 2009

From Javalobby, an interesting and short video showing the evolution of the Java platform since 1991.

Tags: , , ,
Posted in Uncategorized | No Comments »