[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: "with" statement in Lua?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 14 Jul 1999 02:15:41 -0300 (EST)
>From email@example.com Tue Jul 13 22:46:51 1999
>From: Dave Bollinger <DBollinger@compuserve.com>
> >> Which of the three a,v,w are global?
> I knew I was overlooking something, creation, and I see how it would be
>impossible to determine if the coder intended to create a new variable in
>the table or globally. I was approaching it thinking about fields that had
>PREVIOUSLY been created in t, only those would have been table fields, the
>others would've had to been assumed to be global, but that just doesn't
>work if creating NEW fields in t.)
Like I said, there's no notion of "previously created fields".
I mean, there's no way the parser can know about this, because there are no
type declarations for tables.
It *could* be done at runtime, but I think that would be slow.
Plus, like you said, it wouldn't buy us much.
About Modula 3 "with" statement, it seems to me that DO...END with local
declarations is almost equivalent.