Monday, May 26, 2008

Reason 1: Ruby is better than Java

The ThreadLocal concept is part of the Thread object in Ruby. Just use Thread.current["myVariable"] to access the variable.

In Java, this is a big production. Creating a ContextHolder which extends ThreadLocal and then creating a getter and setter for the value you want to keep ThreadLocal.

Score 1 for Ruby...

1 comment:

Anonymous said...

Really great work...
tanks for sharing this....


___________________
Melvin
Call Today for NEXT DAY Instellation to watch your Favorite Channels on HD reciever.