On Wed, Aug 02, 2006 at 11:36:56AM +0900, dblack / wobblini.net wrote:
> 
> Sorry -- at this point my head is spinning.  I really can't untangle
> the thread itself any further.

No problem.  I've had to specifically choose to abandon some of the less
promising subthreads to keep my own head from spinning like a top.


> 
> >. . . which makes me wonder what you were actually saying about my
> >points, now.
> 
> My main point was that you can see a closure in action in a negative
> sense, in a case where there are no local variables, by doing this:
> 
>    def x
>      lambda { puts n }
>    end
> 
>    n = 1
>    x.call   # undefined local variable or method `n'
> 
> You get an error because the "puts n" is being executed in the context
> in which the lambda was created.  If it were being executed in the
> calling context, it would print 1.
> 
> If you rule out calling the lambda a closure, then you have to explain
> this suspiciously closure-like behavior :-)

This is where I thought you were saying that my statements might be
considered splitting hairs -- in differentiating between a closure with
a closure variable and a (non?)closure with a closing lexical scope that
may or may not have a closure variable.


> 
> Closures, one might say, close things out, as well as closing them in.

I certainly agree with that -- though at least one person seemed to
disagree with me on that statement.  At this point, I have no
recollection of who it was or exactly what was said, though.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
"It's just incredible that a trillion-synapse computer could actually
spend Saturday afternoon watching a football game." - Marvin Minsky