On Wed, 2005-05-04 at 09:06, Larry Wall wrote:
> 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;

> It's certainly one of the ones I considered, along with all the other
> brackets, and |+|, plus variants  

I could see [], but the others don't have any mnemonic for
list-opification.

Hmmm...

        $sum = [+] @array

Nice.

> It just seemed like it'd be a little
> visually confusing where you want to turn the list op into a function
> 
>     $sum = (+)(@array);

        $sum = [+](1,2,3);

Not bad, not bad.

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

Juerd mentioned x, which is certainly one such. Any \w+ keyword is going
to be a problem, but I think you can make the case for any:

        sub infix:foo($a,$b){...}

enforcing correct handling of:

        sub list:[foo]([EMAIL PROTECTED]) {...}

Oh hey, I just made up "list:..." There's nothing for that listed in
A12, and that handy table from A12 doesn't show up in S12 or S13... is
that an oversight? Have new categories been added?

-- 
Aaron Sherman <[EMAIL PROTECTED]>
Senior Systems Engineer and Toolsmith
"It's the sound of a satellite saying, 'get me down!'" -Shriekback


Reply via email to