There's a discussion going on #perl6/irc.freenode.org right now wondering
about what .method means.  We'd all assumed it meant $self.method (where
$self is always the method invocant) but then had a look at Synopsis 12 
which states 

  Dot notation can omit the invocant if it's in $_:

    .doit(1,2,3)

This seems to cripple .method's usefulness by coupling it to $_ which
can change often.  Now in order to be safe for anything but trivial methods 
you're back to writing out $self all over the place, something that Perl 6 
was supposed to fix about Perl 5.

It has also been pointed out that .foo, $.foo, @.foo and %.foo are all
(intentionally) similar and all but one operates on the invocant.  Only
.foo operates on $_.  This seems like a newbie trap waiting to happen.
MOST of the time .foo will work like $self.foo but every once in a while
they'll get caught in a gotcha.

Thoughts?

Reply via email to