[m-dev.] Precedence of (,), (<=) and (=>) (...again)

Ian MacLarty maclarty at cs.mu.OZ.AU
Wed Sep 22 19:10:58 AEST 2004

On 22 Sep 2004, at 18:57, Ralph Becket wrote:

> Ian MacLarty, Wednesday, 22 September 2004:
>> To me your suggestion does seem more intuitive.
>> However couldn't this cause existing code to break?  I mean the
>> compiler we can fix ourselves, but what about other projects?  My main
>> worry is that it causes things to silently do the wrong thing.  For
>> example if I have a test:
>> if (a(X) => b(X), c(X)) then ...
>> then the behaviour will change without any warnings or errors.
> This is a valid concern, but I seriously doubt there is much code out
> there that would break as a consequence.  I would lay money on
> virtually all correct uses of (=>) etc. using parentheses for safety.

I think you'd probably win that bet (depending on your definition of 
"virtually all").  I'd put a note in the NEWS file though just to warn 
people of the change.


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