On Thu, Jul 14, 2005 at 12:14:57PM -0600, John Williams wrote:
: Actually I took his question to be:
: If I explicitly name my invocant in the method signature, does that give
: the compiler enough assurance that I'm not going to use .method to mean
: $?SELF.method, and it will allow me to safely use .method as $_.method in
: for and given?
That question also came up in the cabal's last telecon, and I basically
decided that it doesn't. If you want those assurances, a single
would be sufficient, even if you don't use the default of "self", or
whatever self defaults to.
Or we might just go ahead and provide an explicit pragma dealing with
the .foo construct, but I'll be switched if I can come up with a decent
name for it.
use topic "it";
would tend to mean that you want to always use "it" for the topic and
leave .foo for $?SELF.foo. So maybe if you say
it defaults to
use dot '$_';
and in general says, "I know the heck what I'm doing about dot".
[From there our discussion digressed/descended into whether there
should be an "I am an expert" pragma. I was dubious about any sort
of non-feature-based razor.]
Anyway, the people who always want to use .foo for self calls could
use dot '$?SELF';
and then such programs could be plagued by self-dot.