lua-users home
lua-l archive

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


On Feb 15, 2011, at 10:06 AM, Axel Kittenberger wrote:

> I see what I've done here however. _Nobody_ was actually inspired by
> the idea of non-nilness. I'm suprised that no-one pointed the "this
> language you never heared of", that has non-nullable types and
> non-null-pointers.

In ML family languages (SML, OCaml, etc.) and in Haskell reference types are non-nullable. You must use an option type to represent a value that may or may not be present. [An option type is a tagged structure; the closest thing in Lua might be a table with one or two elements, the first element is true if there is a value (the second element in the table), or false if there is no value (second element in the table).]

I am not advocating a Lua dialect with no nil, despite Axel's lucid and interesting proposal.

e