On Tue, 22 Jun 2004, Leopold Toetsch wrote:

> We currently seem to have two different hashes for storing class names:
> one for PMC base classes and one for dynamic PMCs and objects.
>
> I think both should use just interpreter->class_hash. OTOH putting PMC
> names into this one hash makes it more likely that we get name
> collisions for user class names.

Yeah. We probably ought to go rename the PMC classes to have Parrot
prefixes.

> We should be able to subclass PMCs as real objects.

Yep. We need to reserve a bit in the pmc flag word for delegated pmcs too,
but that's a semi-separate issue.

> b3.py seems to do something like:
> # class TT(T):
>     getclass $P0, "Integer"   # Integer PMC class, Python: "int" class
>     subclass $P1, $P0, "TT"   # subclass the PMC
>
> Then it redefines the "__repr__" method, which we BTW don't have. Using
> "get_string" instead could be a problem. Seems that we need a C<repr>
> vtable, which gets called when printing PMCs.

We don't need a __repr__ method. That's just an alternate freeze format.
(Arguably we need a parameter to freeze to note which format to use)

                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to