[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: __index and __newindex
- From: Alexander Gladysh <agladysh@...>
- Date: Wed, 27 Apr 2011 10:52:34 +0400
Hi, list!
I often see that people do miss the fact that __index and __newindex
are called for non-existant keys only. When I was a newbie I missed
that too.
Maybe it is a good idea to emphasize this fact in the manual? Like add
a short sentence to the blob of code that now describes the metamethod
behaviour.
I would even go further and add a full natural language description to
each metamethod. While a blob of code is sufficient, it is too formal
for newbie (who is not necessarily verse enough in Lua to get a full
grasp of it).
Alexander.