lua-users home
lua-l archive

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


On 28/06/2013 13.03, Tim Hill wrote:
There are plenty of cases where being able to "mark" an array entry
as done/dead/empty etc is useful as part of an algorithm. In many
cases you can do that using a sentinel value that is outside the
normal range of expected array types and/or values, but it's all very
domain specific (can I use an empty string? -1? false? auxiliary
state?). I'm basically arguing that "empty" allows you to do this in
a nice, clean, self-documenting, portable manner. I don't really see
anything heretical in that.

empty = {}

--
  Enrico