[Haskell-cafe] history of tuples vs pairs

Lennart Augustsson lennart at augustsson.net
Wed Jun 25 20:50:23 EDT 2008

Yes, early ML had nested pairs.  We introduced n-tuples in Lazy ML
because in a lazy language n-tuples are not isomorphic to nested pairs
(whereas they are in a strict language).  So n-tuples are nasty
because they are not inductive, but they are in many ways much more
reasonable than lazy nested pairs.
BTW, early ML also had binary sums.  Again, they are not isomorphic to
n-ary sums.

  -- Lennart

2008/6/25 Conal Elliott <conal at conal.net>:
> I have a foggy memory that early ML had only binary pairing, nesting for
> n-tuples.  Can anyone confirm this memory.  If so, does anyone remember the
> rationale for going to n-tuples?  Performance, perhaps?
> Similarly, did the Haskell designers consider pairs as an alternative to
> n-ary tuples?
> The reason I ask is that while ghc and libraries suppors n-tuples for some
> values of n, the support is generally incomplete and inconsistent.  And some
> abstractions are very heavily biased toward pairing, particularly Arrow and
> the pair instances of Monad and Applicative.  And of course, inclusion of
> fst and snd in the prelude but lack of similar standard functions for
> n-tuples with n>2.
>   - Conal
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list