chromatic wrote:
On Thursday 06 December 2007 15:49:45 Jonathan Worthington wrote:
What it implemented (when I get chance, which should be this weekend) as
an arity method on the Sub PMC?
That would be much nicer
Implemented in r23598 for the Sub PMC.
(which doesn't make sense with an NCI call) to determine if it has to pass
parameters (which occurs *after* the invoke, which is sort of a problem if you
want to pass parameters to the NCI call you've just invoked and which has
already returned with an error that you haven't actually passed any parameters
to it).
Ah, yes, NCI. I'll have a look at implementing it there too.
Another approach is to have a PMC that wraps up a sub PMC with the
supplied arguments. It'd have an array for supplied positionals and a
slurply for supplied named args. I think that'd give us what we want for
implementing Perl 6's .assuming too, and perhaps better than a thunk...
Heh, wouldn't you call that the Thunk PMC?
I'd have thunk so. If anyone wants such a thing, I can take a crack at
implementing it...
Jonathan