lua-users home
lua-l archive

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


On Wed, Apr 18, 2012 at 8:21 AM, Alexandre Rion <gaumerie@hotmail.com> wrote:
> The problem with that implementation of the # operator is that some people
> rely on the fact that t[#t+1] is always nil to add elements to the table

I'd say 'most people', and (again) it's cool if you know it's a
sequence.  And if someone hands you a non-sequence they had better
document the fact, and/or use __len

steve d.