From: Chad Perrin Date: 2006-08-02T08:20:13+09:00 Subject: Re: I thought this was the one that worked? On Wed, Aug 02, 2006 at 08:15:05AM +0900, Just Another Victim of the Ambient Morality wrote: > > "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... Define "from another scope", then. The program as a whole is a scope, after all -- "another scope", when you're in some other scope contained within the program's scope. -- CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ] "The ability to quote is a serviceable substitute for wit." - W. Somerset Maugham