lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


it would really be nice if one could type something like this:
x = {}
with x do
  a=3
  b=5
  c="this is x.c"
end

print(x.a+x.b) --> 8

----- Original Message ----- 
From: "Peter Shook" <pshook@hotmail.com>
To: <lua@bazar2.conectiva.com.br>
Sent: Saturday, May 31, 2003 5:39 AM
Subject: Re: Object Oriented Lua scope?


> It sure would be nice if we could type:
> 
> function someclass:method(x)
>   local this, that in self
>   if this and that then this = x + that end
> end