Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion right-to-left pipelines
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Me  
View profile  
 More options Dec 9 2002, 6:48 pm
Newsgroups: perl.perl6.language
From: m...@self-reference.com (Me)
Date: Mon, 9 Dec 2002 17:12:13 -0600
Local: Mon, Dec 9 2002 6:12 pm
Subject: Re: right-to-left pipelines

> suggest using >> instead of -> for now,
> as a placeholder.

I like it as the real thing too. It stands
out better in a line, among other advantages.

>    @source >> @out;                    # 'map' or 'assignment'-like
>    @source >> grep { /foo/ } >> @out;  # object-method-like

Yes, several issues arise.

First, I don't think it's necessary to allow
a variable (or variables) to be anywhere other
than the front of a chain.

  @var = [var|code] >> code >> code;

Second, it would be nice to allow a pipeline
element to pass the LHS, and invoke the RHS,
in one of two ways: iterated or not. If this
were to be done implicitly, perl (and humans)
would have to parse the whole pipeline from
the right to left, defeating the point of a
l2r pipeline syntax in the first place. So,
iteration would need to be invoked explicitly.
Perhaps something like:

  @var = for @source >> /foo/ >> sort;

--
ralph


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.