[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: Tue, 24 Apr 2012 10:08:30 +0200
On Tue, Apr 24, 2012 at 9:47 AM, Miles Bader <miles@gnu.org> wrote:
> I make local aliases for table functions, I usually do use a term like
> "array" ("local array_delete = table.remove").
My favourite alias is 'local append = table.insert', seems to appear
at the start of just about any code I write.
Just naming 'table' to 'array' might let people into thinking that
array.insert and array.remove preserve the magic state of Non-Holiness
that we aspire to in our arrays. They should be separate functions;
add an array.issequence predicate and then define them to be safe and
fail noisily otherwise.
Easily done in plain Lua of course, and I wonder if a review of
microlight would be useful. There the logic gets wrapped in the Array
class, but I note that it does not do bounds checking - could at least
be an option.
steve d.
- References:
- 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?), Roberto Ierusalimschy
- Re: Lua 5.2 Length Operator and tables (bug?), Petite Abeille
- Re: Lua 5.2 Length Operator and tables (bug?), Roberto Ierusalimschy
- Re: Lua 5.2 Length Operator and tables (bug?), Petite Abeille
- Re: Lua 5.2 Length Operator and tables (bug?), Petite Abeille
- Re: Lua 5.2 Length Operator and tables (bug?), Petite Abeille
- Re: Lua 5.2 Length Operator and tables (bug?), Axel Kittenberger
- Re: Lua 5.2 Length Operator and tables (bug?), Javier Guerra Giraldez
- Re: Lua 5.2 Length Operator and tables (bug?), steve donovan
- Re: Lua 5.2 Length Operator and tables (bug?), Rena
- Re: Lua 5.2 Length Operator and tables (bug?), Miles Bader