[mercury-users] overloading predicates/functions
Fergus Henderson
fjh at cs.mu.OZ.AU
Sun Oct 3 17:23:11 AEST 1999
On 03-Oct-1999, Michael Day <mikeday at corplink.com.au> wrote:
>
> > - use multiple names with suffixes
> > (e.g. io__write_string, io__write_float in library/io.m)
>
> Even if you use type classes it seems you will likely end up doing this
> anyway, as you have to write the functions to actually implement the type
> classes.
Yes, currently that is true, although now that we support abstract instance
declarations, you can at least make those names private to the module
that defines them. But permitting inline definitions of class methods
in `instance' declarations is one of the things on our "TO DO" list;
when that is done, you'll be able to avoid the suffixes altogether.
--
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