On Apr 15, 2004, at 7:01 AM, Gavin Sinclair wrote:

> On Thursday, April 15, 2004, 7:14:11 PM, David wrote:
>
>>> It would certainly be intersting to hear that.  Up to now I thought
>>> 'lambda' is merely a syntactical alias for 'proc' but I may be wrong 
>>> here.
>
>> No, you're right.  ('proc' is deprecated in favor of lambda, to avoid
>> the similarity in name between the non-similar Proc and proc objects.)
>> But see ruby-core, and probably ruby-talk too in the past; there have
>> been discussions about the various differences between and among Proc
>> objects, lambdas, and code blocks.  (I'm not going to tempt fate by
>> trying to summarize them :-)
>
>
> I wish someone would summarize them.  The inevitable difficulty of
> doing so would demonstrate what to my mind is obvious: the complexity
> is getting way out of hand!
>
> I've forgotten what the motivation for splitting apart a seemingly
> unified concept is.

I agree... I can't help but think that these things could be simplified 
and condensed back into a unified concept. But, right now we have: Proc 
objects, lambdas, and code blocks. And they behave differently in 
things like Class.new, define_method, instance_eval, etc...

What if there were different attributes of blocks that could be 
modified, so that all the different usages could be combined? ie, 
Proc#uses_locals, Proc#checks_arity, etc.

This is just a kinda spur of the moment solution; there is probably a 
big hole or two in the idea. Anyone with more knowledge about Ruby's 
guts care to comment?

cheers,
--Mark