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. 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. 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. =thom Tom MacKenzie: Say, Jubal...how do you feel about astrology? Jubal Harshaw: Never touch the stuff. Prefer brandy. --Stranger in a Strange_Land