Taming the Tiger

My second love Java got a great overhaul last year with J2SE 5.0 ( codenamed "The TIGER") releasing and revolutionizing the Java world. Here is a poem that tells the new features in "The Tiger".

/* Included comments are mine and not by the author. */

The Tiger

By Dr. Joshua Bloch

Tiger, Tiger burning bright
Like a geek who works all night
What new-fangled bit or byte
Could ease the hacker's weary plight?

/* Generics */

To the most despised cast
We'll bid a fond farewell at last
With generics' burning spear
The need for cast will disappear


/* Enhanced for-loop for collections */

While Iterators have their uses
They sometimes strangle us like nooses
With enhanced-for's deadly ray
Iterator's kept at bay

/* Autoboxing and Unboxing */

When from the collections ints are drawn
Wrapper classes make us mourn
When Tiger comes, we'll shed no tears
We'll autobox them in the ears

The int-enum will soon be gone
Like a foe we've known too long.
With type safe-enum's mighty power
Our foe will bother us no more


/* Static import libraries */

And from the constant interface
We shall inherit no disgrace
With static import at our side
Our joy will be unqualified

/* Variable argument passing in methods */

O joyless nights, o joyless days
Our programs cluttered with arrays
With varargs here, we needn't whine;
We'll simply put the args inline


/* Annotations */

As for noble metadata
I'll have to sing its praises later
Its uses are so numerous
To give their due, I'd miss the bus


Tiger, Tiger burning bright
Like a geek who works all night
What new-fangled bit or byte
Could ease the hacker's weary plight?

Comments