Re: Fw: right-to-left pipelines

2002-12-09 Thread Me
   '-' isn't (in my mind) a left-to-right
   flow/assignment operator.  It's a unary
   operator, synonymous with sub without
   parens required around the argument list.
  
 given $foo - $_ { ... }
 given $foo   sub { ... }
 
 Are all equivalent (if sub topicalizes its
 first parameter).

Oh. Now I understand C- rather differently!

The left-to-right flow/assignment viewpoint
had worked for me as an (incorrect) way to
interpret C- when used with Cfor et al.

So, I guess I'm suggesting a binary C- that
really is a left-to-right flow/assignment op
so that:

  @data
- grep { $_  0 }
- sort { $^b = $^a }
- part [/foo/, /bar/]
- @foo, @bar;

does what you'd expect.

--
ralph



Re: Fw: right-to-left pipelines

2002-12-08 Thread Luke Palmer

Note: this is back on-list.

 From: Me [EMAIL PROTECTED]
 Date: Mon, 9 Dec 2002 01:27:55 -0600
 
 [regarding - as a left-to-right pipe-like operator]

 Please do. As in, please point out on list that
 '-' is already established as a left-to-right
 flow/assignment operator so why not consider
 extending/modifying it to be more general? ;

I would, except for '-' isn't (in my mind) a left-to-right
flow/assignment operator.  It's a unary operator, synonymous with
sub without parens required around the argument list.

Luke