develooper Front page | perl.perl6.internals | Postings from February 2002

Re: PMCs, setting, and suchlike things

Thread Previous | Thread Next
From:
Alex Gough
Date:
February 14, 2002 07:49
Subject:
Re: PMCs, setting, and suchlike things
Message ID:
Pine.OSF.4.44.0202141544570.19029-100000@ermine.ox.ac.uk
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.

Alex Gough
-- 
He may look like an idiot, and talk like an idiot...but
don't let that fool you.  He really is an idiot.


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About