[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Making lua case insensitive
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 8 Dec 2000 22:27:00 -0200 (EDT)
>It really would be nice to be able change how Lua looks up local variables from within Lua.
I think that having tag methods for locals would kill the performance edge
of local variables.
>function Person:fullName()
> return self.title.." "..self.firstName.." "..self.lastName
>end
>
>Could become:
>
>function Person:fullName()
> return title.." "..firstName.." "..lastName
>end
I don't see how ag methods for locals would help here: title, firstName,
lastName would be parsed as *global* variables.
You'd have to declare them as local, but in this case, why not write
local title, firstName, lastName = self.title, self.firstName, self.lastName
--lhf