On 5/15/05, Autrijus Tang <[EMAIL PROTECTED]> wrote:
> On Sun, May 15, 2005 at 01:44:44PM +0200, Juerd wrote:
> > I suggest
> >     ./method
> > to mean $?SELF.method

Sounds good.

>     class Person is Mortal {
>         has Weapon %.weapons;
>         ...
>         method battle_choice (Monster $enemy) {
>             given prompt("Your choice?") {
>                 when %.weapons {
>                     ./attack($enemy, $.weapons{$_});
>                 }
>             }

Looks good, too. It's convenient enough to encourage me to use it
consistently. Even when $_ points at the invocant, I'd be strongly
inclined to use ./method for $self.method. After a decade of using
unix shells, typing ./ is closer to huffman(1.1) than huffman(2).

This is a really clean solution.

Ashley Winters :vote<yea>

Reply via email to