Ruby Code blocks - This single language feature in Ruby, has changed the way I think about code. Blocks (called closures in other languages) are definitely, for me, one of the coolest features of Ruby.
Will we have closures in Java 1.7 ? I hope we do.
Another subtle feature, though not obvious, is that Ruby has revived the programmer in me.
By the way, if you don’t know about Apress’ and Pat Eyler’s blog about Ruby contests, check out this month’s contest.
Technorati Tags: Apress, Contest, How has Ruby blown my mind?, Pat Eyler
Posted by Satish Talim


1 response so far ↓
1 Mike Harris // Feb 6, 2007 at 7:36 pm
Ruby makes programming fun. Gld to have you on board.
Small detail: Blocks really are method parameters. The block structure
[1,2,3].each { |x| puts x }
is just syntactic sugar for this
func = lambda { |x| puts x }
[1,2,3].each(&func)
Leave a Comment