Great post, I had the longest time trying to figure out what blocks were. They aren't used that much in PHP and Java and stuff so it was a totally new concept for me.
I still don't understand Procs and Lambdas but my head is too full today, will finish reading your post tomorrow.
As a side note, please enable comments, I'd love to leave you some good feedback on your actual site.
Most of the problem is the `return` keyword. In a proc or lambda, it returns from the proc or lambda. In a block, it returns from whatever is enclosing the block, like a proc, lambda, or method.
If you had a block that was an actual object, it could outlive its enclosing environment. Calling return within it would reincarnate its enclosing environment. Calling return twice would fork time.
In other words, if a block was an object, the return keyword would create a continuation. This is a very expensive, very heavyweight feature in Ruby, and the whole point of blocks is to provide something cheap and lightweight.
Note that a proc or lambda has no such problem, since a return within it returns to whatever invokes the #call method of the proc or lambda.
Imagine how much simpler things would be if Matz had worked this all out and decided that the return keyword was more trouble than it was worth?
Sorry I didn't see this when you posted it. The problem is not `return :foo if bar()`, it's something like `pizzles.each { |p| return :foo if p.bar() }`. In Ruby, that returns from the surrounding method, not from the block where it's defined.
You can decide for yourself if this behaviour of return more trouble than it's worth. I didn't say it was, I said that this definition is what forces a block to be something different from a proc, which makes the language more complicated.
And the much cooler Fibers, which you can think of as a reentrant block, kind of.