[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: In praise of 'nil' (Was: Proposal for table length operator
- From: David Kastrup <dak@...>
- Date: Wed, 15 Dec 2010 09:22:37 +0100
Dirk Laurie <dpl@sun.ac.za> writes:
> 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".
Huh? nil is a very specific value with very specific properties.
> There is no distinction between something unknown and something
> non-existent.
nil is neither.
> For example, if I say
> for i=1,10 do print a[i] end
> and some of those a[i]'s print 'nil', I am not given the information
> of whether that 'nil' is stored as such in the array part, or is just
> missing from the hash part.
nil is the default value of array elements. That does not make the
value unknown or non-existent.
--
David Kastrup