Dan Sugalski <[EMAIL PROTECTED]> wrote:
> Hi folks.

The lost son is back, welcome.

> The easy one first -- why the object is out-of-band, rather than one
> of the parameters.

> Parrot's got the interesting, and somewhat unfortunate, requirement
> of having to allow all subroutines behave as methods and all methods
> behave as subroutines. (This is a perl 5 thing,

*and* a Python thing *and* a Perl6 thing, when it comes to Perl6 multi
subs. And finally *all* Parrot infix operators are multi subs too.
For all these the current scheme does not match.

  multi sub infix:<+>(Int $left, Int $right) {...}

The only remaining methods, where your prerequisite is true is for Perl6
single methods, which the Perl6 code generator can translate either way,
because they are declared with the method keyword.

Please reconsider this decision.

> ... Regardless invokable
> things need to know whether they were called as a method or a sub.

Where currently the first argument (object) is passed in out-of-bounds,
the proposal is to pass the invocant. Nothing would change WRT all the
advantages of the current solution.

> Not having objects handle their own method dispatch is less
> clear-cut, but I do have some reasons, so here they are.

This is ok. See also "Proposed vtable changes WRT method lookup", where
the dispatch and the find_method functionality is split.

leo

Reply via email to