[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Definition of table.insert
- From: Axel Kittenberger <axkibe@...>
- Date: Tue, 11 Jan 2011 12:02:06 +0100
Indeed, for my taste and coder-newbie-friendliness, it would be nice
if paranoid lists would be default, and the pro can turn checking off
for performance than the other way around. No non-pro-lua-coder is
starting by grapping a safe-array implementation.
On Tue, Jan 11, 2011 at 10:45 AM, steve donovan
<steve.j.donovan@gmail.com> wrote:
> On Tue, Jan 11, 2011 at 11:08 AM, Axel Kittenberger <axkibe@gmail.com> wrote:
>> Or in other words, tables keep to be the basic Lua building block, but
>> Lists is a default construct that builds on tables and makes
>> insert/remove/# operations easy.
>
> For instance, [1]. Again, you do pay a penalty, but it should be
> impossible to put holes in your array with this class. It would be
> interesting to find the fastest possible implementation that preserves
> the paranoid properties!
>
> steve d.
>
> [1] http://snippets.luacode.org/sputnik.lua?p=snippets/Safe_Array_100
>
>