If there's no special UNDEFINED value, I think the only natural way to say that there's no answer, is to raise an exception.
With the current exception system, that's not really practical though. Trying to use excpetions for anything other than errors becomes quite messy.
To me, the basic uglyness with the zerotype solution is that it's not really possible to store the value in mapping. And that it is sometimes automatically degraded to an ordinary zero (say, when stored in a certain global variables?).
This is interresting. masts main gripe against UNDEFINED is that it _can_ be stored under certain circumstances, and yours is that it _can't_ under the remaining. :-)
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-01-23 09:54: Subject: Re: zero_type() & UNDEFINED and _typeof()
If there's no special UNDEFINED value, I think the only natural way to say that there's no answer, is to raise an exception.
To me, the basic uglyness with the zerotype solution is that it's not really possible to store the value in mapping. And that it is sometimes automatically degraded to an ordinary zero (say, when stored in a certain global variables?).
/ Niels Möller ()