Dan Sugalski:
# At 10:54 AM -0800 2/18/02, Brent Dax wrote:
# >Dan Sugalski:
# ># Details of strings, PMCs, and vtables shouldn't be exposed
# to people
# ># writing extensions. Strings and PMCs should be opaque types, and
# ># vtables shouldn't be exposed at all, to hide the details of the
# ># implementation. Structure should be completely unexposed.
# >#
# ># Only the core and PMC class authors should see the
# vtables, and only
# ># people actually writing them in C. (PMC classes written in
# ># perl/python/ruby/whatever should see the interface their particular
# ># HLL exposes)
# >#
# ># Probably a good first step for an extending and embedding
# PDD, if we
# ># want just a single one, is to define what's visible where,
# and what's
# ># black magic in other places, just so we can keep this
# stuff straight.
# >
# >*Sigh*.  Okay, then we'll need a different interface to call vtable
# >methods on PMCs from outside.  We can't just say "no, all
# you can do is
# >toss these things around, you can't do anything with them".  Any
# >suggestions?
#
# Actually, we can toss things around without letting folks do
# much with them. :)
#
# What we need to do is make a list of things people will generally
# need to do with PMCs and put together an interface that would let us
# completely yank out the current implementation without affecting any
# extensions.
#
# Getting and setting values, either singly or in aggregate, and
# putting PMCs in other PMCs, is what you'll find 99% of XS code does
# with PMCs. The rest is reasonably abstractable--calling methods on a
# PMC and calling subs are pretty much it for the rest.

What about things like 'add' and 'match'?  It seems fairly likely that
you might want to do such things--and trying to add two complex numbers
manually is not a pretty sight.  :^)

Besides, won't some extension code *define* new PMC types?

--Brent Dax
[EMAIL PROTECTED]
Parrot Configure pumpking, regex hacker, embedding coder, and all-around
good guy
Check out the Parrot FAQ: http://www.panix.com/~ziggy/parrot.html (no,
it's not mine)

<obra> mmmm. hawt sysadmin chx0rs
<lathos> This is sad. I know of *a* hawt sysamin chx0r.
<obra> I know more than a few.
<lathos> obra: There are two? Are you sure it's not the same one?

Reply via email to