[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: stack level parameter
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 19 Jan 2010 08:47:49 +0200
On Tue, Jan 19, 2010 at 8:41 AM, Mark Hamburg <email@example.com> wrote:
> The summary is "functions don't have environments, call frames (activation records) have environments". (Calling a function preserves the current environment. in-do-end temporarily changes the current environment.)
So any function called from in-do-end effectively uses the new
environment. And then for subsequent calls? Does it propagate?
> Certainly it probably pushes harder for using other mechanisms like upvalues to share private data since everything you call will by default be able to see the same globals you can see.
That's a big difference. So lookup is first current environment, then global?