[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.1 has a serious issue
- From: Rici Lake <lua@...>
- Date: Thu, 12 Jan 2006 12:10:06 -0500
On 12-Jan-06, at 12:06 PM, Roberto Ierusalimschy wrote:
As a general rule, Lua does not allow the redefinition of operators for
cases already defined in the language (e.g., add for numbers, concat
for
strings, call for functions).
On the other hand, table get and set is redefinable (partially).
(On the other hand, we do understand that tables may have a different
status, as they are used to represent "all other types" in Lua.)
I think that's the essential point. #table is only useful for a subset
of tables (i.e. non-sparse arrays); there are many cases where you
might want to redefine it; for example, a pure proxy table (commonly
used to allow complete redefinition of get and set).