[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2 Length Operator and tables (bug?)
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 18 Apr 2012 08:40:57 +0200
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.
- References:
- Re: Lua 5.2 Length Operator and tables (bug?), Dirk Laurie
- Re: Lua 5.2 Length Operator and tables (bug?), Robert Virding
- Re: Lua 5.2 Length Operator and tables (bug?), Coda Highland
- Re: Lua 5.2 Length Operator and tables (bug?), Joseph Manning
- Re: Lua 5.2 Length Operator and tables (bug?), Coda Highland
- Re: Lua 5.2 Length Operator and tables (bug?), Dirk Laurie
- Re: Lua 5.2 Length Operator and tables (bug?), Coda Highland
- Re: Lua 5.2 Length Operator and tables (bug?), joao lobato
- Re: Lua 5.2 Length Operator and tables (bug?), Coda Highland
- Re: Lua 5.2 Length Operator and tables (bug?), joao lobato
- Re: Lua 5.2 Length Operator and tables (bug?), Eduardo Ochs
- RE: Lua 5.2 Length Operator and tables (bug?), Alexandre Rion