lua-users home
lua-l archive

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


PS. I like the proposals.

t[] =

is natural for appends

t:append()

is also nice.

DB

On 9/12/06, Tim Gogolin <tgogolin@adobe.com> wrote:

On Sep 11, 2006, at 4:23 PM, D Burgess wrote:

> Hi guys,
> You seem to be repeating a discussion from 1 year, 44 weeks, 2 days,
> 13 hours and 44 minutes ago).

But who's counting? :-)

Seriously though, my attatchment to the feature idea is not strong;
it would just be a convenience. We do have code where the performance
difference is meaningful, but that's *not* the majority of places
where we append items, so I suppose we'll have to live with the more
cumbersome syntax reallyLongName[ #reallyLongName + 1 ] = v  where we
need the speed.

Roberto did mention that he was now favoring the t[ #t + 1 ] = v
syntax (in PIL 2.0, page 171), and that syntax is a little cumbersome
with long names.  Perhaps table.insert() will be with use for a while
longer :-)

--
Tim Gogolin
Adobe Systems