lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

there are a few issues in the manual regarding metatables.  I'll address
them in separate mails.  Here's the first one:

Description of the metamethods respected by Lua is currently a)
scattered throughout the manual and b) non-uniform.

ad a) Section 2.4 contains a list of metamethods, but that list is very
incomplete, e.g., __pairs or __tostring or __metatable are missing.  The
list doesn't serve the purpose of being a reference of Lua's metamethods.

ad b) Searching the manual for metamethods is difficult, e.g., when
quickly checking for metamethod interference while you have an idea.  In
the above mentioned list, metamethods are marked-up as

  * an event name
  * within double quotation marks
  * followed by a colon
  * and all that in a bold font.

A lot of special values are marked-up in the same way, e.g., io.open()
mode arguments.

In the remainder of the manual, metamethods are marked-up as

  * two leading underscores
  * followed by the event name
  * within <code> tags.

How can that be grep'ed or searched with an editor for metamethods?
Please consider consolidating metamethod presentation in the manual.

Best regards,
Stephan Hennig