lua-users home
lua-l archive

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


On Tue, Dec 14, 2010 at 06:06:54PM +0200, Luiz Henrique de Figueiredo wrote:
> >From user point of view is the behaviour of the table.remove function undefined. Is it a feature or a bug?
> 
> Despite its name, the table library should only be applied to arrays,
> which do not have holes.
> 

Maybe even stronger: the table library should only be applied to lists,
which do not have holes and in which the position of a given element
is not invariant.

And from that proposition follows a suggestion:
    In the documentation for table.concat, table.insert, table.remove
and table.sort, replace the parameter name 'table' by the name 'list',
as is already the case for table.unpack.  The documentation is clearer
and shorter by four characters!

Dirk