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

Re: PMCs, setting, and suchlike things

Thread Previous | Thread Next
From:
Melvin Smith
Date:
February 14, 2002 07:42
Subject:
Re: PMCs, setting, and suchlike things
Message ID:
OF45CAE82A.17B67D37-ON85256B60.00555EF4@raleigh.ibm.com
                                                                                                                                
                      Dan Sugalski                                                                                              
                      <dan@sidhe.org>          To:       Dave Mitchell <davem@fdgroup.co.uk>, bmbuck@14850.com,                 
                                                perl6-internals@perl.org                                                        
                      02/14/2002 10:23         cc:                                                                              
                      AM                       Subject:  Re: PMCs, setting, and suchlike things                                 
                                                                                                                                
                                                                                                                                
                                                                                                                                




>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 a flag in the flags field to mark the PMC as a permanent type
>or not. It's insufficient for "Type X or child of X" things, though.

This should be sufficient. The higher level language should take care
of this kind of checking anyway, especially since much of it is
able to be done at compile.

I think in cases of ambiguous combinations you could just fall back
on stringifing the object, right?

I might be missing the whole issue here.

-Melvin Smith

IBM :: Atlanta Innovation Center
melvins@us.ibm.com :: 770-835-6984



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