[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: packing a table (array vs hash)
- From: Alexander Gladysh <agladysh@...>
- Date: Mon, 3 Jan 2011 03:49:39 +0300
On Mon, Jan 3, 2011 at 03:24, Gaspard Bucher <email@example.com> wrote:
> Luabins is doing pretty much what msgpack does.
> Except msgpack is an open format that is supported by other languages (which
> enables my lua scripts to talk with Ruby through the network).
Which is why I wrote Luabins in the first place — I use it where I
don't need other language support, so I don't want to pay for it.
In regard to "openness" — if anyone would want a better documentation
for Luabins format etc, do ask, I'll write them. So far there was
little interest in a library (although there are a couple use-cases
outside of my "environment", and even one independent blog post).
> This is also
> why it is ok to not fully support Lua tables: the goal is not serialization
> but communication (eventually with other languages not supporting Lua table
But you're trying to decide if a table is an array or a dictionary
automatically. This is a thing that should be left to user, IMO.
> As for the speed question, I don't know if it's good or bad, I'm learning...
It is certainly worse than not iterating over a whole table. But is it
good enough — only practice will show.