lua-users home
lua-l archive


Mark Hamburg <> dixit:

> There are times when I miss JavaScript's distinction between nil and undefined. 

Same for me. In // worlds ;-) there are loads of discussions about semantic overloading of null/nil/none, which cause difficult to understand/debug issues.
I long for a "non-settable" (*) value meaning undefined, and only that, that can safely be used with a semantics similar to #ifdef.


x = undef    --> error
return undef --> error
so we cannot charge "undef" with undue semantic meaning (eg "special case", "not found", "exception", "to-be-provided-later"). These are roles for "nil", or better for user-defined or builtin flag values.

la vita e estrany