lua-users home
lua-l archive

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


It was thus said that the Great Dibyendu Majumdar once stated:
> On 19 March 2018 at 17:51, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> > Lua 5.4 should have a constant of type nil called 'null' [1]. Not a
> > new keyword, only a new predefined value.
> >
> > All the functionality aimed for with nil-in-tables can be achieved this way.
> >
> > - Being of type nil, 'null' by itself tests false.
> > - Not being equal to nil, 'nil' is a non-hole.
> > - Can be preassigned to global values (or a value in any table) so
> > that __index can just signal an error.
> >
> 
> Hi, I agree partly with your idea. Maybe Lua can have a well defined
> singleton object call MISSING or NONE or UNDEFINED. Say it is a global
> value which is actually just a Userdata.

  Um ... Roberto just said that "false" was introduced into Lua *just for
this purpose*.

  -spc