cardinal-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Cardinal-dev] Cardinal PMCs


From: David Robins
Subject: [Cardinal-dev] Cardinal PMCs
Date: Thu, 28 Nov 2002 21:21:15 -0500 (EST)

I've been messing around with some code (ruth is the best AST generator so
far, so I'm using it), and looking at Parrot, and I thought I'd throw out
some thoughts and questions about PMCs for Cardinal.

I'm looking at the Ruby built-in classes page
[http://165.193.123.250/book/builtins.html] as my source for required PMCs,
but obviously not all these need to be PMCs.  IMO the criteria for needing
to be a PMC are "can it leverage the Parrot vtable?", and with that in mind
the following shound be PMCs:

Proposed PMC name    Ruby class(es)

RubyArray            Array
RubyInteger          Integer, Fixnum
RubyFloat            Float
RubyHash             Hash
RubyObject           Object and all other classes
RubyString           String
RubyCode             Continuation, Proc, Method
RubyBoolean          FalseClass, TrueClass
RubyFile             IO, File <- but awaiting Parrot file semantics

Some of these might be able to just simply inherit from other types e.g.
the semantics of RubyString might be similar enough to PerlString to use it.

We could also get by just fine with one opaque (to Parrot) "RubyObject"
type, but then we wouldn't be making good use of Parrot.

Also I don't see how to dynamically load extension PMCs (pmc2c.pl doesn't
even look at the 'extension' keyword), so I'll probably build these as
built-ins for my local copy of Parrot until I figure out how to use and load
extension PMCs.

Comments?

Dave
Isa. 40:31





reply via email to

[Prev in Thread] Current Thread [Next in Thread]