[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Unexpected table.remove behaviour.
- From: Enrico Colombini <erix@...>
- Date: Wed, 24 Jun 2009 21:24:02 +0200
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 :-)