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

Re: reduce metaoperator

Thread Previous | Thread Next
From:
Larry Wall
Date:
May 4, 2005 06:07
Subject:
Re: reduce metaoperator
Message ID:
20050504130650.GC2741@wall.org
On Wed, May 04, 2005 at 09:00:46AM -0400, Aaron Sherman wrote:
: That said, let me try to be helpful, and not just complain:
: 
: 	$sum = (+) @array;
: 
: I've not thought through all of the implications to the parser, but I
: think this works, and it certainly ends up looking very mnemonic for
: what you're trying to do!

It's certainly one of the ones I considered, along with all the other
brackets, and |+|, plus variants  It just seemed like it'd be a little
visually confusing where you want to turn the list op into a function

    $sum = (+)(@array);

But maybe that's not a problem.  But there are other potential
ambiguities besides visual, I suspect.

Larry

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