In a message dated Mon, 9 Dec 2002, Stéphane Payrard writes:

>
>
> [snipped]
>
> > so it's easy to build up more complex right-to-left pipelines, like:
> >
> >     (@foo, @bar) :=
> >             part [/foo/, /bar/],
> >                     sort { $^b <=> $^a }
> >                             grep { $_ > 0 }
> >                                     @data;
> >
> >
>
> I would like perl6 to support left-to-right part/sort/grep pipelines.
> Left to right syntax is generally good because it facilitates the flow
> of reading.

It is good for a rather deeper reason than just facilitating the flow of
reading.  Psycholinguistic experiments show that the human brain can't
absorb the meaning of such language structures when an "unbound referent"
has not been filled.  Consider the difference in comprehensibility of

  I gave my friend who I saw last July in the park near the summer
  cottage one afternoon when it was rainy but fairly warm my standard
  talk on linguistic complexity.

vs.

  I gave my standard talk on linguistic complexity to my friend who I saw
  last July in the park near the summer cottage one afternoon when it was
  rainy but fairly warm.

Pipelines in general--get everything done HERE, then hand it off to
something THERE, and then somewhere ELSE--are much easier for the mind to
comprehend than nested structures where the referent on which the whole
structure depends is found at the beginning or the end.

I can say

  The dog bit the cat who chased the rat who stole the cheese which
  spoiled in the barn which was built by the farmer who married the
  teacher who....

more or less indefinitely.  We should definitely have the ability to
pipeline as effectively in Perl, and that means left-to-right.

Trey
-- 
I'm looking for work.  If you need a SAGE Level IV with 10 years Perl,
tool development, training, and architecture experience, please email me
at [EMAIL PROTECTED]  I'm willing to relocate for the right opportunity.

Reply via email to