develooper Front page | perl.perl6.language | Postings from June 2005

Re: Ignoring parameters

Thread Previous | Thread Next
From:
John Siracusa
Date:
June 17, 2005 16:38
Subject:
Re: Ignoring parameters
Message ID:
BED8D722.3E168%siracusa@mindspring.com
On 6/17/05 6:18 PM, Damian Conway wrote:
> John Siracusa wrote:
>> (BTW, I'm not sure where those "./" thingies came from, but it's what GMail
>> showed in your message.  I'm assuming it should just be ".")
> 
> No. There's now also a unary ./ operator in Perl 6.
> 
> Unary . calls a specified method on the current topic.
> Unary ./ calls a specified method on the current invocant.
> 
> The point being that methods no longer topicalize their invocant. So you need
> to use ./ instead of . to call methods on an implicit invocant.

Wow, that..er...how did I miss that?  It looks a lot like running an
executable in the current dir instead of letting the shell search its path.
Was that intentional?  Was this syntax discussed on a mailing list or
elsewhere?  I really liked plain old .foo(), but I guess I'll just use
explicit invocants and look like an old fuddy duddy... :)

(also, at least it's not "/." <shudder> ;)
-John




Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About