Beyond Java

Lately, the most talked about book in the programming language related blogosphere seems to be “Beyond Java”:http://www.oreilly.com/catalog/beyondjava/, a book written by Bruce Tate, published by O’Reilly. If I knew I’d have time to read it in the next couple of months I’d buy it, but I know I won’t.

Luckily, as I mentioned, there’s this thing called blogs which at least give me the gist of the book. Let’s first have a look at how O’Reilly describes the book:

In Beyond Java, Bruce Tate, author of the Jolt Award-winning Better, Faster, Lighter Java, chronicles the rise of the most successful language of all time, and then lays out, in painstaking detail, the compromises the founders had to make to establish success. If you are agree with the book’s premise — that Java’s reign is coming to an end — then this book will help you start to build your skills accordingly. Beyond Java will teach you what a new language needs to succeed, so when things do change, you’ll be more prepared. And even if you think Java is here to stay, you can use the best techniques from frameworks introduced in this book to improve what you’re doing in Java today.

Ok, first thing, this book is not really about Java in the sense in that you’ll learn neat Java tricks or to learn the language. It’s more about what’s “not great”:http://www.zefhemel.com/archives/2004/08/16/why-java-sucks “about the language”:http://www.zefhemel.com/archives/2004/09/03/a-better-java and particularly, it seems, why Ruby is much better.

Yes, Ruby seems to be the answer, at least that’s what all the blog posts I read seem to focus on. Why not Python? Well… I don’t know, probably because it’s lacking the killer app which Ruby does have: “Ruby on Rails”:http://www.rubyonrails.org. If you haven’t started learning or using RoR yet by the way, start now, all the cool kids do it. Ok, I’m sounding too cynical now, but actually I’m pretty happy RoR is taking off. Ruby is so much better than PHP and RoR truly is an amazing web framework.

But I’m getting off track. As I haven’t read Beyond Java myself, the purpose of this post was to link to some opinionated people that have, such as “Bruce Eckel”:http://www.artima.com/forums/flat.jsp?forum=106&thread=141312:

Where did the hyper-enthusiasts go? To Ruby, apparently. This is chronicled in Bruce Tate’s book “Beyond Java,” which should probably be titled “Why Ruby is Better than Java.” The book is roughly edited; you’ll find yourself thinking “haven’t I read this paragraph before?” in any number of places, but that’s a disappointing experience I’ve had with several O’Reilly books of late. In many places he plays fast and loose, and almost at the end of the book he declares that he doesn’t have time to learn these other languages in any depth — although he has no trouble condemning the same languages in his rush to Ruby. Such a statement should be in the first paragraph of the book: “I’ve decided that I love Ruby, so I will condemn other languages without fully understanding them” (in one sentence repeated in a number of places in the book, for example, he declares that C# is no more than a clone of Java). I’ve been on the rollercoaster of language-love myself in the past and have made similar mistakes; one error in particular was dismissing Python’s scoping-by-indentation when I first saw it (months later realizing that we always indicate scoping by indentation anyway, even when we have curly braces available). Now I try to investigate and support my ideas about these things more thoroughly. It takes a lot more time and effort to do so, but it also leaves a more lasting impression.

Just incidentally, in this post Bruce links to an “interesting page where somebody comments on Ruby’s Array API”:http://www.cafeaulait.org/oldnews/news2005December8.html, which is worth a read.

And “David Heinemeier Hansson”:http://www.loudthinking.com/arc/000551.html (the driving force behind RoR) replies:

I’m losing track of the ill-conceived comparisons, but I do know what’s astoundingly clear: Bruce Eckel doesn’t like Ruby, he doesn’t like the attention its getting, and he doesn’t like people such as Bruce Tate fueling that attention.

No beef, that’s cool. But why not just say it like that? You could even have presented yourself as the polar opposite to the so-called hyper-enthusiasts: A hyper-detractor! The label comes complete with a cape, an evil smirk, and long tirades about how the other side is no match for your master plan.

What I think? I still don’t know. I’ve been working with Python for a while and a while ago started using Java again. I must say I love how Eclipse seems to understand my code, helps me with code completion, adding try/catch blocks and refactoring. I hate the idea to lose all that in a language like Ruby or Python. But it is pretty clear that in a language like Ruby you can achieve more with a lot less code. So, yeah, I’ll keep my spectator seat for now.