3 ms·
> Too bad ruby stopped short of doing the trivial obvious thing and just making blocks be regular values. Abstractly, I kind of see the point, in practice, I d
by dragonwriter 5y ago
> Too bad ruby stopped short of doing the trivial obvious thing and just making blocks be regular values.
Abstractly, I kind of see the point, in practice, I don't see it makes much difference, and given Ruby’s two flavors of function-like objects, it seems to work out for the best.
> the inability to do anything with a block literal other than send it.
But sending lets you do anything else you’d want to to do with it. Specifically, to get either of the flavors of callables, you pass it to “proc” or “lambda”, and then use the result.