wolverian wrote:
> On Mon, May 16, 2005 at 02:26:02PM -0400, Matt Fowles wrote:
>> $.foo
>> @.foo
>> %.foo
>> and their ilk operate on the current invocant, $?SELF.  This leads
>> naturally toward &.foo also refering to $?SELF.  But as we all know
>> the & is optional on function calls...
> I believe you are thinking in Perl 5. :) In Perl 6, &foo is a
> reference to the function foo, and never a call. That makes it
> symmetric with the other $.foo notations.

yes, but with parens, it *is* a call:
  sub foo(...) {...}
  say &foo(...);      # Calls &foo
  say  foo(...);      # Calls &foo
  say &foo;           # "CODE(0x....)" or somesuch

(FWIW, I agree with Matt, but Juerd's ./method is nice, too. And we
shouldn't forget that Perl 6's OO is *far* more than that "method on
self" thing. I favour .method meaning $?SELF.method, but this only a
very minor issue when comparing with roles, autogenerated accessors,
anonymous roles|classes, parameterized roles, etc. :))


Linux, the choice of a GNU | The next statement is not true. The
generation on a dual AMD   | previous statement is true.  
Athlon!                    | 

Reply via email to