I'm currently trying to put together a first draft of PDD 11 (extensions) based on extend.pod plus the comments in extend.c and I've got a few questions:
[NB. I've dropped the Parrot_PMC prefixes below to save typing]
i) We have _get_string, _get_pointer, _get_intval, _get_numval, _get_cstring and _get_cstringn. We also have intkey variants of all of these, _except_ for _get_string. Is this missing deliberately, or was this just an oversight?
Oversight.
ii) The only way we have to access keyed aggregates is via intkeys. Shouldn't we also be able to access them using strings or PMCs as keys? [We do, after all, have the vtable functions to allow this]
Yes. There's no API defined to create keys yet.
iii) At the moment, to create a new PMC, you need to know its internal identifier number. You can retrieve this using Parrot_PMC_typenum if you know the name of the PMC that you want to create, but what do you do if you're just handed a PMC and you want to say 'Create me a PMC of the same type as this one'?
There needs to be a "get me the type of this PMC" entry.
The API's not exactly ad hoc, but I only implemented the stuff that anyone writing extensions (basically just Arthur for Ponie) needed. There's a lot of stuff that should go in, and could be easily fleshed out with orthogonality in mind, that isn't there yet.
--
Dan
--------------------------------------"it's like this"------------------- Dan Sugalski even samurai [EMAIL PROTECTED] have teddy bears and even teddy bears get drunk