lua-users home
lua-l archive

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


In message <CAO40MimhQ7=Zzav4q2Fk4UaF3GRBiahOrsDqt4xEBLtxvyAsKg@mail.gmail.com>
          Gregg Reynolds <dev@mobileink.com> wrote:

>On Jul 24, 2016 3:27 PM, "Sean Conner" <sean@conman.org> wrote:

>>   Javascript has an "undefined" state, in addition to a "null" state.
>> Perhaps Lua should have one as well.  To me, "nil" means "the absence of a
>> value" while "undef" means "this never had a value to begin with".

Is the proposed 'undef' to be assignable? If so, how does its semantics differ
from 'nil'. If not, does that mean that lengths of tables can never be decreased?
Is it to be coerced to 'false' in those contexts where 'nil' is coerced to
false?

Perhaps there should be different 'undefs' according to the circumstances -
error objects that have state (line number, error message, ... )?
--
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/