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 <[EMAIL PROTECTED]>: > 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 > [email protected] > http://www.haskell.org/mailman/listinfo/haskell-cafe > > _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
