On Wed, Aug 02, 2006 at 05:22:05AM +0900, ara.t.howard / noaa.gov wrote:
> On Wed, 2 Aug 2006, Chad Perrin wrote:
> >
> >That's not much of a closure, then.
> 
> that's an absurd thing to say don't you think?  it's not bad or good - it is
> what it is.  it is in fact a very pure closure which perfectly captures the
> state in which it was defined in.  note that i said it captures the 'state'
> and not the 'state of the state' - in otherwords it has a pointer to the 
> state
> and not a copy of the state.  that way it even has access to newly added
> information as my example shows.  this is amazingly powerful even if it
> doesn't fit your idea of what a closure may or may not be.

No, I don't think it's "an absurd thing to say" -- it just doesn't have
much depth.  The depth is this:

If it doesn't provide what OOPish programmers would call "protection",
it's not a closure.  How can it be a closure if it's not closed?


> 
> i might add that perl has exactly this kind of enclosing semantics and is
> considered to have 'true' closures.

True -- but that doesn't mean that "this kind of enclosing semantics" is
the closure itself.  See above, re: closing something to create a
closure.

-- 
CCD CopyWrite Chad Perrin [ http://ccd.apotheon.org ]
"The first rule of magic is simple. Don't waste your time waving your
hands and hopping when a rock or a club will do." - McCloctnick the Lucid