Archive for September, 2009

JDK7 Tackles Java Verbosity

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: , , , , , , ,

A Brief History of Java and JDBC

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

Tags: , , ,