Thursday, May 11, 2006

Why Java pales in comparison to Ruby

Ruby stands out in comparison with Java in a lot of ways. Its dynamic nature provides for a lot of interesting ways to look at programming. For someone coming in from the java world, the nice hacks that you can never do using java include

  1. Ability to Intercept messages (aka method calls) to Objects using callbacks
  2. Define a class instance for each object. We can change class defnitions associated with one instance of an object ! You can just imagine what u can do with that.
  3. Dynamic Typing - any object that supports a certain message can be used. So no messing around with casts. Code becomes more cleaner and shorter.
  4. Dynamically extend funtionality of any class meaning no class is sealed/final and we can define methods in Object class itself and all objects across can see the new method immediately.
  5. Dynamically create/remove methods/classes on the fly.
  6. Support some forms of functional programming
Anyways this list is not complete or comprehensive. It just contains a list that springs to my mind immediately.

Java purists(lovers ?) can argue that barring the language constructs things like VM optimization, non-green threads, extensive libraries that just about do anything would take a lot of time to manifest in Ruby. Both have their merits and de-merits. But for something that was built by someone in their spare time and with no big corp support (likes of Sun, IBM and Oracle) Ruby sure has come a looooong way.

Subscribe to comments for this post


Anonymous said...

I realized that you have deleted a blog entry that something on performance tuning using in memory DB, why has it been deleted? It was interesting on how you tuned it.

Anonymous said...

hello bros. I'm actually into shoes and I was digging for the sake of that singular make. The prices as regards the boots are around 170 dollars on every site. But definitively I base this area selling them as a remedy for half price. I really want those [url=]prada sneakers[/url]. I will definetly purchase those. what can you say about it?

Anonymous said...

Hello. And Bye.

Anonymous said...

good morning friends. I'm honestly into shoes and I had been digging as far as something that particular make. The prices as regards the sneakers were approximately 310 bucks on every site. But completely I bring about this location selling them as a remedy for half price. I really want those [url=]gucci sneakers[/url]. I will absolutely order these. what can you tell me about these?

Anonymous said...

good morning people. I'm honestly into shoes and I have been searching for that meticulous make. The prices for the boots were approximately 310 dollars on every page. But completely I base this location selling them someone is concerned half price. I exceptionally want these [url=]gucci sneakers[/url]. I will definetly order these. what do you think?

Clicky Web Analytics