lua-users home
lua-l archive

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

Bulat Ziganshin wrote:
i'm among those who thinks that these two concepts sliced together
(1. tables as arrays+hashes, and 2. nil as default value of any table
element) makes language somewhat too complicated

Complexity is in the eye of the beholder :-)
Some people (myself, for example) find the dual nature of Lua tables simple, elegant and powerful.

If you are not comfortable with it, just think of arrays and hash tables as two different structures and use *either* one or the other. Don't make holes in arrays (use 'false' or a special marker if you need) and they won't make holes in your code :-)