|
|
|
|
|
by drnewman
392 days ago
|
|
It seems you're pretty upset about your experience with Ruby. I'm sorry that's been the case for you. However, in Ruby blocks aren't just about flexibility, more importantly they're about generality. They're not there to resolve an edge case at all (Ruby also has keywords for loops). They're a generalization of control flow that is just slightly less general than continuations. In practical use they provide an alterative to Lisp macros for many use cases. These were some of the problems Matz was trying to sort out with his design of Ruby--creating a language that was fun and easy to use for day-to-day programming, with as much of the meta-programming power of Lisp and Smalltalk as possible. Blocks are one of his true innovatations that came from trying to balance that tension. |
|
How do they differ from Smallalk blocks? (I don't know.)
https://drcuis.github.io/TheCuisBook/Block-syntax.html