[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: RES: RES: Cryptic OOP syntax
- From: skaller <skaller@...>
- Date: 02 Feb 2005 13:36:41 +1100
On Wed, 2005-02-02 at 10:08, Mark Hamburg wrote:
> on 2/1/05 2:44 PM, skaller at skaller@users.sourceforge.net wrote:
>
> That being said, given that setfenv makes functions mutable entities,
This sounds dangerously close to dynamic scoping, first used in
Lisp 3 decades ago and now debunked. I haven't looked into
it deeply but setfenv is one of the things I'd be considering
throwing out of Lua.
The correct way to have a 'variable' environment for
a function is to pass it an argument.
If you want to 'fix' the environment, you just curry
the function, the first argument could be a table ..
hmm .. you might think on that in context of your
'functions in table constructors' idea..
--
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850,
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net