It sounds like you are contradicting yourself. On one hand you say that it is useful to return zerotypes from functions, but on the other hand you say that zerotypes are not useful as long as there is another way to check membership of indices.
/ Marcus Comstedt (ACROSS) (Hail Ilpalazzo!)
Previous text:
2003-01-23 00:13: Subject: Re: zero_type() & UNDEFINED and _typeof()
UNDEFINED is not useless. It's very useful to e.g. use as a return value from a function.
The real problem is that there is no operation "check the existence of the index foo" that is separate from "get the value of index foo". Instead there is this kludge by overloading the value zero with different subtypes. I think the good solution is to add a check for existence operation and then let a zero just be a zero. (The other zero types are fairly obscure and could probably be done away with easily or simply ignored.)
There was a discussion a while back about adding new operators for insert and delete operations, foo+[bar]=gnu and foo-[bar] (something I intend to do when I get the time, unless someone beats me to it). In the same vein an operator for this could be added. The logical choice would be foo?[bar] but unfortunately there was some grammatic problem with that, if I remember correctly.
/ Martin Stjernholm, Roxen IS