(Note that "./" and "../" are prefix operators, and unlike ".?", ".*", ".+" and ".=", cannot be used infix. In fact, it requires that "?", "*", "+" and "=" be thought of as meta-operators to ".", and from now on, to "./" and "../" as well, so you get "./+method". This isn't as complex as it looks right now.)
Your opinions please! (I ask those who already responded off-list, to repeat their opinion here)
Since new syntax is being suggested for these things, here is my suggestion, very late in the discussion, but here it is anyway.
$_ is the topic; the "only" problem is that we have two topics here: an immediate and a "main" topic. What if a method call binds the invocant to *both* $_ and the "bigger topic" $__?
method foo($x){ # invocant accessible by both $__ and $_ for (1..3) { # invocant accessible by $__ only .bar(); # called on $_ $__.bat(); # called on the invocant $?CLASS.bas(); } }
I like this because things still look a little like a topic. This is not better than $o/$O, except that $__ looks more like $_ (but maybe it looks too much like $_, and that alone could invalidate this proposal).
Comments?
--abhijit
Abhijit Mahabal http://www.cs.indiana.edu/~amahabal/