[mercury-users] Re:[mercury-users] difference between is and =?
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Apr 27 20:36:11 AEST 2001
On 27-Apr-2001, Terrence Brannon <princepawn at earthlink.net> wrote:
> in the last clause of this function, is is used instead of =. Why is
> this? In fact, what is is?
It's for "hysterical raisins": originally this code was written so that it
would work with a Prolog compiler. In Prolog, you need to use "is"
rather than "=" for arithmetic expression evaluation.
Originally the Mercury compiler was written in the intersection of
Prolog and Mercury, so that we could use a Prolog compiler to bootstrap it.
So the Mercury compiler allowed the use of "is" in Mercury,
treating it just as a synonym for "=".
Nowadays we don't use a Prolog compiler for bootstrapping.
But the Mercury compiler still allows this use of "is".
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
| of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- 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