lua-users home
lua-l archive

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


perhaps this is too obvious, but I would be very happy with something
simple, like for example, just declaring "local ;" at the start of a
function to make all created variables local without a verbose
declaration for each one.  it might also be nice to have an equivelant
OO syntax, such that all (undeclared) variable accesses are equivelant
to "self."whatever in the object's functions, or relative to any
specified table.  maybe something like c++'s "using" declaration, ala
"using self" or "using(self)", thus "local x = {a=5}; using(x); local
c=a;" gives c==5.  this may be possible with existing meta-mechanisms, I
haven't thought about how to impliment "using".  to use Lua for simple
scripting/configuration, procedural coding, and OO coding, this would
suit me fine.  whatever the solution, I hope it's kept simple and
elegant in the spirit of Lua.  just my 2c.

-Lucas