[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: __goodies
- From: Gavin Wraith <gavin@...>
- Date: Thu, 03 Oct 2019 20:41:25 +0100
In message <20191003164705.GB5557@arraial.inf.puc-rio.br>
Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
>The reason for the absence of __close (and __gc, for that matter), is
>because Section 2.4 concerns "certain special operations": Going
>out of scope or becoming unreachable are not operations. We might
>adapt the language to include __close and __gc there, but it is not
>clear what would be the gains. (Should we include __mode too?)
>For regular operations, metamethods work as extensions to the usual
>semantics, so it makes sense to document them separately, to not
>clutter the documentation of each operation.
>
>On the other hand, __close is deeply attached to <close>. One is
>meaningless without the other. So, it does not make much sense to
>explain them separately. A similar argument seems to apply to __gc
>and __mode. (However, "__name" is currently homeless.)
>
>For a complete list of all indices used on metatables for all purposes,
>the following shell script gives an answer:
>
> $ grep -hoE '__[a-z]+' manual/manual.html | sort -u
Thanks. That explains the decisions behind where in the manual
they come. It is a finer analysis of 'event'.
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/