[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: lists with nil play nice for Lua 5.2
- From: Ketmar Dark <ketmar@...>
- Date: Sat, 28 Jul 2007 23:51:51 +0300
On Sat, 28 Jul 2007 16:38:39 -0400
John Belmonte <john@neggie.net> wrote:
> Common ways in which such lists are created include:
>
> { 2, nil, 'bar' } -- literal list with nil
> { f() } -- capture function return vals which include
> nil { ... } -- capture function/chunk args which include
> nil
a strange way, indeed. why not change `nil' to `false'? Lua is
weak-typed, so one can use some unique value (string, for example) to
mark `unidefined, but present' values.