[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: How can one decide between 'not set' and 'not existing?
- From: Jay Carlson <nop@...>
- Date: Wed, 25 Jul 2012 22:46:49 -0400
On Jul 25, 2012, at 5:09 PM, Coda Highland wrote:
> On Wed, Jul 25, 2012 at 2:02 PM, Dimiter 'malkia' Stanev
> <malkia@gmail.com> wrote:
>> -- "function() end" would gurantee an unique value, differentiated from
>> others, unless the VM merges it under one umbrella. Even them, maybe reusing
>> coroutine might return you an unique value for the lifetime of the
>> application (or something even simpler)
>
> Unless I miss my guess, the VM couldn't merge it because they'd have
> different upvalues.
There are no free variables in function() end and hence no upvalues, so it certainly could be merged/hoisted to chunk level.
Use NULL={} instead. List constructors guarantee uniqueness.