[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Down with Upvalues
- From: Edgar Toernig <froese@...>
- Date: Mon, 03 Sep 2001 04:44:32 +0200
John Belmonte wrote:
>
> Edgar Toernig wrote:
>
> > > ... an optional stepping stone which is this: lexical scoping with
> > > read-only access. This is what John Ramsdell already
> > > suggested. Read-only access would still necessitate the use
> > > of "closure tables", but would at least get rid of the upvalue
> > > syntax.
> >
> > Like this: http://groups.yahoo.com/group/lua-l/message/1650 ?
>
> No I think that may be different. The "upvalues" in your modification were
> still copies of the original variable right? In other words if the original
> value is changed it won't affect the closure.
Right. It only removes the special syntax (%) and allows access to all
upper scopes. The semantic does not change.
> This is significant because if the read-access semantics will change from
> the "stepping stone" to the ideal then it's not a stepping stone at all, and
> will just confuse things by introducing more version incompatibilities.
Oh, Ok. Got that wrong. But it's not the read vs read/write that makes
all this that difficult but the sharing of the variables. The difference
from your "stepping stone" to the full version would only be some trivial
lines of code.
Ciao, ET.