[m-dev.] Ordered conjunction

Ralph Becket rbeck at microsoft.com
Fri Aug 25 17:46:45 AEST 2000


> From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> 
> > In `(P -> Q ; fail), R' I'm not allowed to use variables 
> that are bound inside
> > P, instead they must be bound inside Q.
> >
> > It would not make much sence to enforce this same 
> restriction on `P && Q, R'.
> 
> Oh, good point.  I hadn't thought of that.  I agree with your
> conclusion that the left-hand operand of `&&' should be allowed to
> bind non-local variables.
> 
> In that case, I guess we can't get away with just a syntactic 
> expansion.
> I think this difference in mode-correctness from if-then-else is also
> an argument against using `then' or `->' for the syntax.

Agree.

> [...]
> Personally, I think `P, Q && R' should parse as `(P, Q) && R'
> and `P & Q && R' should parse as `(P & Q) && R'.  So I suggest
> we give `&&' priority 1040, which is between `&' and `->' 
> (which is 1050).
> The intution behind this is that when in doubt, a sequence constraint
> should be interpreted as strongly as possible, because the consequence
> of interpreting it too strongly is just reduced parallelism, whereas
> the consequence of interpreting it too weakly might be as bad as
> an infinite loop or an unwanted exception.
> 
> Comments?

Sounds good to me.

--
Ralph Becket      |      MSR Cambridge      |      rbeck at microsoft.com 
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list