Block performance in Ruby

What I find most interesting here is that the difference between yield and "inline" is this negligible, which explains why Ruby users are so enamored with the feature.

That stated, the runtime wonk in me would love for some Ruby expert out there to explain the underlying reasons why yield is so much faster than

I can guess, but I'd rather be told.

Don Box does some experimenting...


I just noticed this project and since we like discussing language-in-a-language projects, I thought I'd mention it.

It seems that they are almost ready to run Rails. Now that's going to be cool!

Monads in Ruby

Monads in Ruby, a several-part work in progress, is an attempt to explain and demonstrate monads in Ruby. It looks pretty good so far, although I feel like we could coax a friendlier syntax out of Ruby with a little effort. Maybe in Part 4!

Obligatory LtU connection: the author credits Dave Herman's Schemer's Introduction to Monads as an inspiration.

(One of my co-workers mentioned this to me. I think he might have been making fun of me...)

Ruby the Rival

Chris Adamson at published interviews with a few language luminaries and Java developers. Inspired by Bruce Tate's book Beyond Java, Adamson argues that Ruby is poised to become Java's successor:

Bruce Tate's Beyond Java argues that Java's reign as the top enterprise development language must eventually come to an end and that, for the first time in a decade, major enterprise innovation is occurring outside of the Java realm. In the book, he looks at the unique traits that has allowed to Java to achieve its unprecedented level of success, and then considers what new languages would have to do and be to succeed Java.

Later chapters look at specific languages contending in this space, and clearly favors Ruby as the front-runner. This comes from Tate's own performance breakthroughs (fueled by Ruby on Rails), an analysis of the language, and anecdotal evidence from others who've tried the language.

Is Ruby already shaping up to succeed Java? What's broken with Java that Ruby fixes? And are the two mutually incompatible?

To survey the situation, we contacted several prominent authors, bloggers, and developers to get their takes. Their responses are reprinted in whole in this article.

The interviews are a very interesting read, and the dialogue covers a diverse range of topics. The power of Ruby on Rails is a common theme throughout, and Tate argues that Rails is the catalyst that will push Ruby into the mainstream. What I don't understand is this: if Rails will make Ruby the next Java, why didn't Zope do that for Python?

XML feed