lua-users home
lua-l archive

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

On Thu, Mar 16, 2017 at 1:52 PM, Chris Jones <> wrote:
> I've always been curious what the reasoning is for not having all of the
> table functions, as methods on table objects.

I suppose it's because tables start out life clean, without metatables
or identity. It's easy enough to give them a metatable with __index
pointing to table with a custom constructor like T{...}.

> Yes, a thousand times this. I've accepted far too much code into Hammerspoon

I think I'm a sinner then - because I have a compulsion to rename
table.insert as append!  Mostly because the word 'insert' sets up an
argument in my head ;)