[m-dev.] for review: tuples [1]

Fergus Henderson fjh at cs.mu.OZ.AU
Mon Aug 7 07:43:00 AEST 2000


On 06-Aug-2000, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> Given that tuples are going to be used mostly for overcoming
> limitations in interfaces (for passing multiple arguments where
> only one is allowed), I think that not being able to write
> instance declarations which work for all tuple types is not
> a big problem.

I don't see how that follows.
Won't abstract interfaces (which are the places where
you need to pass multiple arguments where only one is allowed)
be exactly the kind of places where type classes will be used?
That is, when using tuples, won't it be common to have e.g.

	:- pred foo(T, ...) <= blah(T).

and to want to pass a tuple as foo's first argument?

I don't think it would be a big problem, because in general
you can always just write out the first N instance declarations
for e.g. N = 5, and that is enough most of them time.
But it would be a wart.

-- 
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-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list