[mercury-users] Indexing & operational semantics

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Feb 2 15:36:08 AEDT 2000


On 02-Feb-2000, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> On Wed, Feb 02, 2000 at 12:24:06PM +1300, Richard A. O'Keefe wrote:
> > Peter Schachte wrote:
> > 	(I'm using && as sequential conjunction for this
> > 	example.)  The only subtlety is in choosing the precedence for &&.
> > 	Should a, b && c, d associate as (a,b) && (c,d) or as a, (b && c), d?
> > 	
> > Either way is bound to confuse someone.
> 
> It's a danger, but I think it manageable.  It's much like `,' and `;'
> now:  the solution is good layout conventions.  [...]
> I guess now I'm arguing for making `,'
> bind tighter than `&&'; it just seems to work out better that way.

I agree; that also fits with my natural intuition.

The next question is what the relative precedence of `&' (parallel
conjunction) and `&&' (sequential conjunction) should be.
Should `a & b && c & d' associate as `(a & b) && (c & d)'
or as `a & (b && c) & d'?

For that one, Richard O'Keefe's argument about disallowing
such expressions on the grounds that they are likely to be
confusing is stronger.  However, that would require some
changes to our current operator-precedence parsing method,
so it's a bit more difficult to implement.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list