On Wednesday, January 29, 2003, at 11:02  AM, Jonathan Scott Duff wrote:
So you can't set something to its type's own empty value, because it
will, by definition, thereafter return it's "overloaded" empty value,
<def>.
Looks like a maintenance nightmare to me.
Agreed, it's not pretty. The fundamental problem is that a primitive like an C<int> simply cannot be undefined... there's no flag for that (which is they're primitive.) So it having a 'default value' at all is perhaps a bit of a misnomer.

A simple solution is perhaps to say that C<is default> can only be applied to types that can be undef (scalar,ref,Int,Str...) and can't be used on things that have no undefined state (bit,int,str...).

That would neatly sidestep the problem, and would _force_ you to use Int instead of int when you wanted a default-instead-of-undefined case.

MikeL



Reply via email to