At 3:48 PM +0000 2/14/02, Alex Gough wrote: >On Thu, 14 Feb 2002, Melvin Smith wrote: > >> >my Dog $spot = Dog.new("waggly tail"); >> >$spot = Cat.new(); >> >> In this case all types are known at compile time. Why would >> we relegate this to a runtime vtable check or bit flag? > >There's no reason to suspect that Dog::new will actually return a Dog >object or that Cat::new won't, that's just not Perl. If we're to >check the type of the value being stored in $spot, we pretty much have >to do it at run time.
Yup. There's no guarantee that any particular sub or method call will return what we think it does, and without digging into the code we can't tell. (Well, short of prototypes, at least) -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk