From: Just Another Victim of the Ambient Morality Date: 2006-08-02T08:15:05+09:00 Subject: Re: I thought this was the one that worked? "Chad Perrin" wrote in message news:20060801195029.GF30216@apotheon.com... > On Tue, Aug 01, 2006 at 09:40:05PM +0900, Just Another Victim of the > Ambient Morality wrote: >> >> ...and this would be a problem if the definition of a closure is the >> calling of a Proc object derived from a block. Alas, that is _not_ the >> definition of a closure... >> When we yield to the block, we are doing so in our method, which is >> _not_ the same scope as the scope where the block was created. Yet, the >> block we're yielding to still has access to that other scope. How? >> Because >> it is a closure... > > We're back to the absurdly broad here: > > If any "thing" that has access to another scope is a closure, that makes > every nested "thing" in a language with global and/or lexical scope a > "closure". That's a little like defining a "human" as "has four limbs". Again, there is context (in the English sense of the word) to what I said that. In fact, it looks like you've narrowed into a specific part of the paragraph while ignoring other parts of that very same paragraph... If we have access to a scope _from_another_scope,_ then we are a closure. I do not think this is absurdly broad... "if" and "while" (code) blocks don't introduce a new scope, which explains why they have access to their environments...