Damian Conway wrote:
> 
> My forthcoming proposal will be that invocants still be passed as $_[0]
> by default, but that there be a pragma allowing $_[0] to be automagically
> shifted somewhere else during dispatch. For example:
> 
>         use invocant '$ME';
>         sub method { print "I was called through: $ME";
>                      print "My args were: @_";          }

What don't you like about the current RFC? What specific problems are
there? I would urge you to read through the thread some.

The RFC notes you can call self() anywhere, allowing you to arbitrarily
encapsulate code. I don't see how a pragma could do this.

How is your idea any better than:

   sub method {
      my $ME = self;
   }

And why is passing $self in $_[0] a good thing? 

If we're going down the prama path, I say we get rid of want() and
instead have a pragma:

   use want '$WANT';
   sub method {
       if ( $WANT eq 'HASH' )  { ... }
   }

This seems just as silly to me. We have caller(), want(), why not
self()?

-Nate

Reply via email to