Well, I think too that UNDEFINED is basically ugly, much on the same ground. The ugliness gets worse since it's inconsistent. I'd like a solution where there was no need for such a value at all, but so far noone has come up with an alternative that is good enough.
/ Martin Stjernholm, Roxen IS
Previous text:
2003-01-23 13:03: 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.
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!)