[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: When is multiple assignment good style?
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 16 Mar 2017 14:39:23 +0200
On Thu, Mar 16, 2017 at 1:52 PM, Chris Jones <cmsj@tenshu.net> 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 ;)