On Fri, Apr 23, 2004 at 12:46:04PM -0400, Dan Sugalski wrote:
: Sure, that's doable, as are a number of other things. Depends on the 
: semantics of assignment to uninitialized types, though that's on a 
: per-type basis. This all gets somewhat messy when you mix in objects 
: and types, since what you'd do for storage depends on a number of 
: factors. (Like we want a low-level int if that was "my int $foo", a 
: generic restriction on what it can hold a reference to if Joe's just 
: a dull class, or impose assignment semantics on if it's a bit more 
: active)

Sort of an "All's fair in love and war and assignment."  :-)

I think all three of your behaviors are possible from your other
message.  #2 comes about if there's a declared coercion operator
between the classes.  But maybe that's just a check the compiler
wraps around the assignment.  Dunno.  I try to stay out of the SMOPs,
and occasionally succeed.

Larry

Reply via email to