lua-users home
lua-l archive

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


On Wed, 15 Dec 2010 09:31:57 +0200, Dirk Laurie <dpl@sun.ac.za> wrote:

On Wed, Dec 15, 2010 at 08:54:59AM +0200, Axel Kittenberger wrote:
>    What happened before the Big Bang?  Nil.

As empiricist I must say, no. We don't know. Might been Nil, might
been something else. Currently no way to guess.
Exactly my point, actually.

"nil" in lua means "not one of the possibilities that we know
something about".  There is no distinction between something unknown
and something non-existent.

In Lua, almost. Example (5.2):

print(table.pack((function()return end)()).n) -- 0
print(table.pack((function()return nil end)()).n) -- 1
print(table.pack((function()return nil, nil end)()).n) -- 2

If 'nil' was to really be indistinguishable from "non-existent", all three
would have to print '0'.