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

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Aug 2 00:11:05 AEST 2000


On 01-Aug-2000, Michael Day <mcda at students.cs.mu.oz.au> wrote:
> 
> > Any plans to deprecate the pair/2 type?
> 
> Could perhaps someone skilled in the use of tuples in functional languages
> (Ralph?) say a few words regarding when it is more appropriate to use
> tuples and when to use pair or other similar types?

There's essentially no difference between binary tuples and the `pair'
type, except for the syntax.

A tuple type is similar to an unnamed record type with unnamed fields.
If a type is used in lots of places, it is almost always better to
give it a name.  But if a type is used only briefly, then an unnamed
tuple type may be more appropriate.

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