[mercury-users] Proposed change to char literal syntax

Ralph Becket rafe at csse.unimelb.edu.au
Thu Oct 5 11:47:52 AEST 2006


Michael Day, Thursday,  5 October 2006:
> More specifically, I was trying to point out that if character literals 
> were actually just function calls, then there would not need to be any 
> special new syntax, as 'a' would still just be a quoted one letter 
> symbol, that would resolve to :- func char.a = char assuming that you 
> had imported the char module.

Alas, that isn't quite true.  Because of an early decision to make
Mercury strings identical to C strings, you can't have a function symbol
that contains character code 0 (NUL).  I think the string decision was a
poor one, but currently that's what we have.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list