Re: RFC 152 (v1) Replace $self in @_ with self() builtin (not $ME )

[email protected] (Damian Conway)
Newsgroups perl.perl6.language.objects
Message-ID <[email protected]>
   > What about
   > 
   >     sub somename : method (@args) {...}
   > 
   > And leaving your$self some other way at the object?

That's the idea. By default you get the invocant in $_[0],
but you can have the compiler extract it for you via C<use invocant>.
Then you get to choose your access mechanism (lexical scalar or subroutine)
and what that access mechanism is called.

And yes, it *would* be great if methods honoured their parameter lists!

:-)

Damian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.