I think this should mean $_, and if the user really really really
wants to do .foo on the invocant, then why not just say:

method bar ($_:) { 
        .foo;
}

This keeps $_ unambiguosly the 'it', while 'this' is more specific.

Think:

        it puts the lotion on the skin
        method blah {
                for ($.prisoners) {
                        .put($lotion, $skin); # is the same as
                        $_.put($lotion, $skin);
                }
        }

It is not us, it is not self, it is not here, it is, err, just the
default. For implies it in this case.

Contrary:

        this puts the lotion on the skin
        self ~~
        method cooperate ($self:) { # in class Prisoner
                # this method puts lotion on skin, haha
                $self.put($lotion, $skin);
        }

We are discussing a certain thing, which is the invocant. It's not
default. The default might be something else altogether. It's pretty
obvious that in a method like this the invocant is the default, but
what if it isn't?

Perhaps i'm sort of forcing this distinction.

However, I wouldn't be too happy with having to do this, though:

        method data {
                map { $OUTER::_.process($_) } .things;
        }

or having to name the invocant every time I want to map {}.


Lastly, what is wrong with

        $.method?

-- 
 ()  Yuval Kogman <[EMAIL PROTECTED]> 0xEBD27418  perl hacker &
 /\  kung foo master: /me dodges cabbages like macalypse log N: neeyah!

Attachment: pgpqRpkMb5Me5.pgp
Description: PGP signature

Reply via email to