Original-Via: uk.ac.nsf; Tue, 5 Nov 91 21:15:51 GMT

| From: Tony Davie <[EMAIL PROTECTED]>
| Subject:      fixity of /
|
| It has been pointed out to me by the Yale implementers
| that the expression a*b/c causes a parse error because / is infix
| rather than infixl and is of the same precedence (7) as * which IS
| infixl.
|
| Is this an oversight of someone on the committee or are Haskell arithmetic
| expressions different from those of most other languages on purpose? If so
| what was the purpose?
|
| Tony

This was deliberate.  There was a strong opinion among some of the
committee that most other languages get this wrong, because  x/y/z
should be regarded as ambiguous, just as

         x
        ---
         y
        ---
         z

would be in mathematics.

Personally, I would be happy to conform to other programming languages.
Also, I think you can make a better case for making / non-associative
if you also give it a precedence between + and *  (or even lower
than +).

--Joe

Reply via email to