Dan Sugalski <[EMAIL PROTECTED]> wrote:

> The note here is that Parrot's MMD function signature for binary ops
> doesn't match what Python needs. Parrot is:

>      void binary_mmd_op(pmc left, pmc right, pmc dest)

> where Python is:

>      pmc dest = left.add(pmc right)

Perl6 allows (according to S06) for calling a multi method:

  mulit sub f($a, $b: $c) { ... }

function call syntax:

  f($x, $y, $z);

as well as method call syntax on the first invocant:

  $x.f($y, $z);

Perl5 as well as Python have the invocant as the first function
argument.

We could now of course translate at runtime between these call schemes
(prepend P2 and shift all up or move P5 into current_object and shift
arguments down). But this takes some time.

Why do we have the special notion of current_object in the first place?
Why not just pass all in as P5, P6, ...?

leo

Reply via email to