[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Closure of lexical environment in Scheme closures
- From: "Dr. Rich Artym" <rartym@...>
- Date: Thu, 11 Nov 2004 21:58:31 +0000
On Thu, Nov 11, 2004 at 04:33:28PM -0500, Brian Casiello wrote:
> So it's the fact that assigments (i.e. set!) are allowed, not the
> closure issue (since closures are handled the same way as scheme),
> that make lua not a purely functional language?
Oh I don't think so, since Lua has never been described as a purely
functional language, or at least I've never heard anyone suggest that.
It's only the implementation of closures that gives me any worry here,
since closures are meant to create pure functions out of impure ones.
After all, that's what's being closed, the impact of the rest of the
universe on the function.
If the semantics of a function can be made to change by modifying the
values of its non-local and non-argument variables then those variables
haven't been closed, and you don't have a closure, you just have an
ordinary function with unclosed state.
Existing media are so disconnected from reality that our policy debates
spin around a fantasy world in which the future looks far too much like
the past. http://www.zyvex.com/nanotech/MITtecRvwSmlWrld/article.html