Ask HN: What's the point of distinguishing lambda, block and proc in Ruby?

7 points by avodonosov ↗ HN
(I would have asked on #ruby but it's more interesting to hear from people with wider spectrum of language preferences)

1 comment

[ 2.9 ms ] story [ 7.2 ms ] thread
Distinguishing lambda, block and proc (function, sub) is traditional, and only in advanced lisp/FP circles people know of the equivalence.

Or do you mean technically? pure mini optimization. A block needs no signature/arg processing, and no name, a lambda needs no name. Otherwise they are the same. For the compiler they are almost the same.