Hacker News new | ask | show | jobs
by mmartinson 2583 days ago
> What is special about Ruby? Blocks

As far as I can tell, blocks are just some sort of hack to get around the performance overhead of using lambdas. They feel like more of a bug than a feature. Why, otherwise, would it be sane to have an ubiquitous feature that is almost a lambda, but less flexible, while also having lambdas that no one uses.

Ruby was my first programming language. I would agree that it's natural feeling, but it is the opposite of simple.

1 comments

I don't really understand your argument here, blocks and lambdas are both procs. A block is just a special proc that can't be assigned to a variable. There's nothing less flexible about a block as opposed to a lambda, they both utilize the same functionality.