> Mailing-List: contact [EMAIL PROTECTED]; run by ezmlm
> Date: Wed, 8 Jan 2003 11:30:51 -0500 (EST)
> From: "attriel" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> X-SMTPD: qpsmtpd/0.20, http://develooper.com/code/qpsmtpd/
> 
> 
> Note 1) This is the second time I'm typing this
> Note 2) Ctrl-Shift-Capslock apparently closes all current instances of
> mozilla ... that was weird
> 
> > I'm not even sure how that would parse, though that:
> >     @keep <~ grep /good/ <~ @list ~> grep /bad!/ ~> @throw;
> > would go like:
> >     ( @keep <~ grep /good/ <~ @list ) ~> grep /bad!/ ~> @throw;
> >
> > which is probably not what i wanted...
> 
> I would, from the descriptions, imagine that:
>   @keep <~ grep /good/ <~ @list ~> grep /bad!/ ~> @throw;
> 
> Would parse as:
>   @keep <~ grep /good/ <~ @list;
>   @list ~> grep /bad!/ ~> @throw;

Nope.  <~ and ~> only *rearrange* arguments, so if you only type @list
once, you can only do things that you could before when you typed
@list only once.

When we present this in the documentation (wishful thinking, now), it
will be important that we present it in precisely that way, as
argument rearrangers, lest people actually try that kind of foulplay.
In that documentation we should probably suggest that the arrows go
only one way per statement, otherwise you might not get what you
expect.

> Due to that being what is almost always going to be intended, I think. 
> Also, since we'd want $a <~ 2 + 4; to be $a = 6;, I would imagine that <~
> and ~> would need low priorities. 

Precedences.  Yes.

> Further, since <~ stars at the end of the list and works its way
> left, it would need a lower priority than ~> which starts at the
> beginning and works its way right. 

Not necessarily.  <~ will necessarily need to be right-associative,
while ~> left, however.  It would be logical to give them the same
precedence, except for the opposite associativity thing, where parsers
get different results based on their parse method.  So different
precedences would be good only to ensure that different parsers saw
the same thing.

> So if it did have a parenthetical variation, I would imagine it
> would be
> 
>   @keep <~ grep /good/ <~ (@list ~> grep /bad!/ ~> @throw);
> 
> Which is, still, probably not what you wanted.

Right.  And probably not recommended.

> OTOH, I'm still new at posting here, and I may not be following all the
> bits that came before :o

You're quickly getting the hang of it.

Luke

Reply via email to