[mercury-users] list functor style functions

Lee Naish lee at cs.mu.OZ.AU
Fri Nov 12 16:37:30 AEDT 1999


>Hmmmmm.  This sounds like a good place for user-defined equality.  To
>me, an empty graph is an empty graph.

Bingo!  The distinction between foo_init and foo_empty needs to be made
when there is more than one distinct *representation* for an empty foo.
The builtin equality compares representations, which is not what you
want.

Sometimes you can solve the problem with more tricky representations.
Sometimes there is really no problem, except the designer was thinking
too procedurally.  Sometimes user-defined equality is the nicest answer.

	lee
--------------------------------------------------------------------------
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