On Sun, Jun 12, 2005 at 10:52:37AM +0200, Klaas-Jan Stol wrote:
> I read that when creating a new class, then a new ParrotClass is
> created. (ParrotObject is the PMC that takes care of the
> implementation of a run-time object in Parrot, right?). But, a new
> class can inherit from a built-in PMC type, right?

Yes, there's a PMC inheritance mechanism that works for things that
wouldn't be called "classes" in Perl 6.  For example, PerlUndef is a
PMC that's derived from PerlInt.  (Someday, I hope to know why.)

> suppose the Perl datatypes were not implemented as PMCs but rather
> as user-defined classes (written in PIR). [...]  This would work
> too, right?

I think so, though I imagine it would be a bit of work to make sure
the ParrotObjects were actually complying 100% with the API provided
by the current PMCs.

I can imagine that for debugging purposes -- or maybe just for the
sheer fun of it -- someone will eventually try it.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to