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

Re: Referencing a caller's slurpy array.

Thread Previous
From:
Larry Wall
Date:
March 16, 2005 10:55
Subject:
Re: Referencing a caller's slurpy array.
Message ID:
20050316185518.GJ27352@wall.org
On Wed, Mar 16, 2005 at 11:53:43AM -0700, Luke Palmer wrote:
: Larry Wall writes:
: > Certainly.  The zone markers are as orthogonal to sigils as we can
: > make 'em.  Though I'm not sure we've given a meaning to *&foo yet.
: > I suppose that would have to mean that the next slurpy parameter has
: > to be a sub ref.
: 
: Uhmm... isn't *&foo the adverbial block?  That is, isn't it where grep
: gets its code block in:
: 
:     @list.grep:{ $_ % 2 }

Maybe it can mean either of those things without conflict, as long
as you don't try to make it mean both.  :{...} is just short for a
named parameter that happens to bind to the *&foo looking parameter,
but as with ordinary list operators, they can be passed positionally
as well as by name.

But yes, to be perfectly frank, I'd forgotten about that.  Doubtless
a sign of premature senility.

Larry

Thread Previous


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