Larry wrote:

> : > >      use invocant 'self';
> 
> Hmm.  My first inclination is to say it should be something like:
> 
>     macro self { '%MY.frame.arg[0]' }
> 
> But suppose you want all .foo to refer to self and not to the current
> topic.  It would be problematic to have a macro whose name is "".
> So you might say something like this:
> 
>     use invocant "";
> 
> Still a bit odd syntactically, however.

Perhaps a bare:

        use invocant;

overrides unary dot within the lexical scope, causing it to default to using
each method's @_[0], rather than $_.


> One is vaguely tempted to make
> 
>     ..foo(1)
> 
> mean self.foo(1).  But then we'd see methods chock full of *that* even
> when it wasn't necessary.  Much rather see self.foo(1).

Yep. Besides, since we're working towards having the unary version of operators
vaguely related to the binary version in Perl 6 (e.g. unary C<_>, unary C<+>,
unary C<.>), it would seem counterproductive to have unary C<..> utterly
unrelated to binary C<..>.


> Fortunately, Igority is transitive...

I thought that was maxim was: "Igorance is blithth".

Damian

Reply via email to