On Wed, Jan 29, 2003 at 11:32:53AM -0800, Michael Lazzaro wrote:
> 
> 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.)    

The solution I advocate is to allow even "primitive" types to hold
undef.  I don't have an implementation, but that's just a detail I'll
leave to those actually doing the implementation  :-)

> 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 works too (probably better depending on who you ask :)

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to