[mercury-users] An ugliness in the language (char literals)
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Aug 2 14:23:37 AEST 2000
On 02-Aug-2000, Peter Schachte <schachte at cs.mu.OZ.AU> wrote:
> On Tue, Aug 01, 2000 at 08:11:08AM -0700, Ralph Becket wrote:
> > If I want to write down a char literal, the only consistent syntax
> > for doing so is ('x').
...
> > Ugh. Ain't Prolog syntax ugly at times?
>
> Yes it is, but this isn't one of those times. Prolog doesn't have a character
> type, it just uses integers.
Well, you could argue that Prolog does have any types at all.
But if you accept that Prolog does have types, just dynamically
checked ones, what is the type of the ISO Prolog predicate `atom_chars'?
Prolog allows the programmer to use either single-character atoms _or_
integer codes. The use of integer codes is more common, but it's
certainly not the only option.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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