lua-users home
lua-l archive

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


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"
}

--
Disclaimer: these emails may be made public at any given time, with or without reason. If you don't agree with this, DO NOT REPLY.