Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Calling conventions and return conventions

6 views
Skip to first unread message

Dan Sugalski

unread,
Sep 23, 2003, 10:48:04 AM9/23/03
to perl6-i...@perl.org
I've not got time yet to write this up formally, but....

There's no difference between calling a sub PMC with parameters and
invoking a return continuation with return values. The return values for
that continuation are just sent as parameters, as if you were calling it
as a function.

Yes, that means that if you do:

$return_cont->(1, 2, 3);

it's the same as:

return (1,2,3);

assuming $return_cont has your return continuation in it. If programs want
to specify the types of the return values they can attach a prototype
property to their return continuation, which can be queried the same (and
yes, I know its unspecified) way that you can do it if you have a sub PMC.

I'll update the PDD as soon as I can get time and some working brain
cells.

Dan

0 new messages