lua-users home
lua-l archive

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


On Sat, Jun 18, 2016 at 10:25 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2016-06-17 18:49 GMT+02:00 Viacheslav Usov <via.usov@gmail.com>:
> These functions are officially part of Lua's standard libraries. However,
> except in their own subsections, they are not mentioned in the reference
> manual, and their own subsections have no useful keyword like "vararg" and
> "multiple results". The free version of the Lua book is obsolete in this
> respect.
>
> When you know how and when these functions are used, then the manual makes
> perfect sense. But if you do not, then you cannot even find them there
> (except by reading it through). I would say that some examples and
> cross-references would be very helpful.

http://www.lua.org/pil/

As I said, the free version is obsolete in that respect.

Speaking of the more recent version, personally, I am much more likely to use information available electronically than bother with paper. In this case, however, I am making the effort :) And my effort tells me that the function select is not mentioned in PiL 3rd edition at all. It is not in the index, and it is not in section 5.2. Moreover, the section may easily suggest to the reader that the proper way to deal with truly variadic arguments is by collecting them into a table first. Which is suboptimal, to put it mildly.

Cheers,
V.