[mercury-users] An ugliness in the language (char literals)
Ralph Becket
rbeck at microsoft.com
Wed Aug 2 01:11:08 AEST 2000
I recoded most of the mtags program in Mercury because I don't have
Perl installed on my home machine (it's a religeous thing). I got
an unpleasant shock.
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.
Ugh. Ain't Prolog syntax ugly at times?
Ralph
--
Ralph Becket | MSR Cambridge | rbeck at microsoft.com
--------------------------------------------------------------------------
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