Paul Seamons wrote:

So then, to get back to the invocant... I can't say that I liked many of the proposals. The one that seemed to have merit though was $^. I'd propose the following.


  meth foo {
     $_.meth; # defaults to the invocant
     .meth; # operates on $_ which defaults to the invocant
     $^.meth;  # is the invocant
     $^1.meth; # is the first invocant
     $^2.meth; # is the second invocant

I'm starting to get confused at the "need" for all these special variables. I vote that we steal from prior art in numerous other languages and just auto-set $SELF or $THIS or whatever and call it done.


Having .method assume $SELF is an added nicety, but if it introduces added parsing problems then it's hardly worth it.

OR, choose $^ and don't set $SELF (or $?SELF or whatever), but having dup short and long names is a waste, since people will always chose the short one (who uses English in Perl 5, really?)

-Nate

Reply via email to