[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Making lua case insensitive
- From: Steve Dekorte <steve@...>
- Date: Fri, 8 Dec 2000 16:20:21 -0800
Luiz Henrique de Figueiredo wrote:
> The "idiomatic" Lua way would be to use get/setglobal tag methods, but this
> does not handle locals or table fields, as has already been pointed.
It really would be nice to be able change how Lua looks up local variables from within Lua. This would allow variable references in object methods to automatically look in self (as in many OO languages) if a local doesn't match.
Example:
function Person:fullName()
return self.title.." "..self.firstName.." "..self.lastName
end
Could become:
function Person:fullName()
return title.." "..firstName.." "..lastName
end
Steve