[mercury-users] An ugliness in the language (char literals)
Robert Jeschofnik
rejj at students.cs.mu.oz.au
Wed Aug 2 01:26:46 AEST 2000
On 01-Aug-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> If I want to write down a char literal, the only consistent syntax
> for doing so is ('x'). This strikes me as a bit grotty. The problem
> arises in that
> (1) some characters, e.g. `_', have to be escaped in quotes to avoid
> being interpreted as non-chars, and
> (2) some characters, e.g. `+', have to be bracketed otherwise the
> parser expects them to be part of an, in this case infix, expression.
The first thing this makes me think of is that the precedence for `' must be
wrong. Surely '+' would only ever mean "the plus symbol".
Perhaps infix operations should use `some-op` instead of 'some_op'. Infact, I
thought they did..
rob
--------------------------------------------------------------------------
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