From: Sean O'Halpin Date: 2005-10-19T01:29:10+09:00 Subject: Re: Anonymous methods, blocks etc. (Cont. 'default block params') On 10/18/05, Austin Ziegler wrote: > There is a difference between anonymous functions (lambdas) and blocks > in that blocks are considered -- after a fashion -- to be an extension > of the using/calling method. I see that there is a difference in what either of us means by an "anonymous function". I mean something like the body of a def method without a name - what you get when you use the method() function (i.e. opaque scope, no closure) - you mean lambda (i.e. closure). > I personally don't believe that it would necessarily be more efficient Yes, I hadn't thought of the cost of setting up a new scope (silly considering that is one of the main reasons I would like to see anonymous functions). I guess the only real way to find out would be to try it. > It also seemed to me that Matz wasn't fond of the reuse of "def". Shame - I thought the lambda/def distinction was a good one. > > > > lambda [|x| ... ] > > No. That's even uglier than the first. Ah well. Different eyes I guess :) Sean