--- Thom Boyer <[EMAIL PROTECTED]> wrote:
> Mr. Nobody <[EMAIL PROTECTED]> wrote:
> > --- Damian Conway <[EMAIL PROTECTED]> wrote:
> > >         @a ~> grep {...} ~> map {...} ~> sort ~> @out;
> > 
> > That's going to be just plain confusing. Arguments to functions are
> supposed
> > to be on the right. And what's up with using them for assignment? That's
> > making them even more overcomplicated and ugly. Do you care about
> readability
> > at all? It seems to me that ~> and <~ have no use except making perl 6
> uglier
> > and more complicated than it already is. They're completely unnecessary.
> 
> 1) "Arguments to functions are supposed to be on the right." 
> 
> Hmmm. If you use a mathematical context, I guess "supposed to" could be
> code
> for "I've always done it that way". But certainly not "supposed to" in any
> cosmic sense. 
> 
> But what The Damian is proposing is much more like a Unix pipeline than
> mathematics.
>      @a ~> grep {...} ~> map {...} ~> sort ~> @out;
> makes much more sense when you see it as being much more akin to
>      cat a | grep ... | tr ... | sort > out
> than
>      let out = sort(map {...} (grep {...} @a))
> No, it's not like the math that is one of Perl's influences. It's like the
> Unix shells, which is another of Perl's influences.

It's not letting you do anything that you couldn't do before with normal
function calls and assignment.
 
> 2) "And what's up with using them for assignment? That's making them even
> more overcomplicated and ugly. "
> 
> If you read ~> and <~ as "stuff this thingy into that doohicky", assignment
> makes perfect sense. They are plumbing connectors: sometimes they connect
> the water softener to the water heater (one device to another), and
> sometimes they connect to the water supply (a source) or the sink (a sink).
> 
> I don't see that as an overcomplication, but as a very straightforward and
> obvious extension.

I see it as making a bad idea even worse. I've never liked having one thing
doing multiple completely different and ambiguous actions. (Does "$a ~> $b"
mean "$b.($a)" or "$b = $a"? How about "if $a ~> foo {...}"?)

> 3)  "Do you care about readability at all? It seems to me that ~> and <~
> have no use except making perl 6 uglier and more complicated than it
> already
> is."
> 
> I think ~> and <~ look pretty nice. They read well as a single symbol, they
> make good sense, they make it possible to say more directly exactly what
> your code means, they show the direction of data flow quite well, and the
> "ripply water" look emphasizes the plumbing analogy.

I agree that they look nice. It's a shame that they're being used for such an
awful proposal.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Reply via email to