From: Jacob Fugal Date: 2006-08-02T05:43:30+09:00 Subject: Re: I thought this was the one that worked? On 8/1/06, Chad Perrin wrote: > On Wed, Aug 02, 2006 at 05:19:38AM +0900, Jacob Fugal wrote: > > Actually, if you go back and read David's post [ruby-talk:205331], > > which is the first reference to hair splitting in this thread, you'll > > see that he clearly believes both of the first two examples to be > > closures. When he mentions hair splitting, it's directly in relation > > to the third form -- an unconverted (yielded to) block. > > You were right, up to the point where you said "When he mentions hair > splitting". The problem at that point that prompted him to mention hair > splitting was the fact that I was balking at defining that second > example as a "closure". I've now come to the conclusion that the second > example is a closure according to at least some, valid from a given > perspective, interpretations of the meaning of "closure". Thus, I quit > splitting that hair and said "Okay, so I'll stipulate that the second > example can be called a closure, depending on interpretation." Ok, I've tried my bit at patience. I am certain now that you are being intentionally stubborn and difficult. Let me quote from the message I referenced. You said, "I don't see how it's still a closure if the 'bar = 1' is removed from foo." He replied, "It's a closure because it carries the context of its creation with it." He certainly didn't hair-split around that. He then proceeded to the "hair-splitting section": > Some subtle but possible interesting hair-splitting: > > Of course, not all blocks end up getting turned into Proc objects; > some remain just syntactic constructs: > > a = 1 > [1,2,3].each {|x| puts x + a } > > I guess you could debate whether that block is a closure, since it > never leaves the context where it's created I can't see how you can interpret his "hair-splitting" as not referring to his reference to non-converted blocks. Jacob Fugal