[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [manual] chaining metamethods
- From: Dirk Laurie <dirk.laurie@...>
- Date: Thu, 28 Jan 2016 10:37:31 +0200
2016-01-28 8:23 GMT+02:00 Ahmed Charles <firstname.lastname@example.org>:
> On 1/27/2016 9:04 AM, Stephan Hennig wrote:
>> Note that queries for metamethods are always raw; the access
>> to a metamethod does not invoke other metamethods.
>> , new to the Lua 5.3 manual, is misleading. The second half of the
>> sentence can be interpreted as: An access to a metamethod, which can be
>> a table as described later, will not respect that table's metatable.
>> Which is not true and which would make chaining metamethods impossible.
>> What does not invoke other metamethods is retrieving metamethods from
>> the metatable itself.
> The unambiguous interpretation is that the second part of the sentence
> is clarifying the first part, i.e. what it means for a query to be raw.
In fact, if the documentation can be improved, omitting that second
part is a possibility. Elsewhere, especially under 'rawget', the issue is