lua-users home
lua-l archive

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


In order to help the creator of the AutoHotkey language to implement
true arrays or associative arrays (I already wrote about this), I made a
little comparison of this feature in three scripting languages I know
well enough to be relatively accurate... This is to provide some ideas
on possible syntaxes and functions.

I post this because, of course, Lua is one of these three languages.

Seasoned Lua programmers won't find much interesting stuff, beginners
might be interested to have a look.

I had to write some functions (Split, Reverse, Splice, Slice, Concat and
a simplified version of the mandatory DumpObject) to show off the same base features than JavaScript (PHP has an explosion of functions, the
messy feeling this choice of words might left is intentional...).

These functions might be buggy (I tested quickly some cases, not
everything) or even might be written more elegantly or more efficiently,
but hey, if somebody has a use for them, they are free to the taking.

--
Philippe Lhoste
--  (near) Paris -- France
--  http://Phi.Lho.free.fr
--  --  --  --  --  --  --  --  --  --  --  --  --  --