[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: undef [was: Re: metatable transmission]
- From: spir <denis.spir@...>
- Date: Tue, 22 Dec 2009 20:25:04 +0100
Mark Hamburg <mark@grubmah.com> 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.
Denis
(*)
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
http://spir.wikidot.com/