lua-users home
lua-l archive

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


2016-08-08 3:25 GMT+02:00 Soni L. <fakedme@gmail.com>:
> The current table library should be renamed. And a new table library should
> be put in its place.
>
> The following functions are table-specific:
>
> table = {
>   rawget = rawget, -- only valid for tables
>   rawset = rawset, -- only valid for tables
>   rawlen = rawlen, -- only valid for tables
>   pack = table.pack, -- returns a table
> }
>
> The following functions should be put in a different library:
>
> list = { -- "concat", "insert", "remove", "sort" and "unpack" all take
>          -- a "list" argument, so "list" makes sense here.
>          -- http://www.lua.org/manual/5.3/manual.html#6.6
>   concat = table.concat,
>   insert = table.insert,
>   remove = table.remove,
>   sort = table.sort,
>   unpack = table.unpack,
>   move = table.move, -- only function that doesn't take a "list"
> }

There is nothing in the above that cannot be done at the Lua
level by those [1] who like it that way.

[1] The word 'those' must not be understood to imply that I think
there is more thanone such person.