Pattern matching makes tuples really useful. Sometimes you just want to return a pair of values and you don't feel like making a one off constructor for it.
Eg: random :: (RandomGen g, Random a) => g -> (a, g). Without tuples you'd have to have a one off type data RandomGenWithRandom g a = RGWR g a, which is overkill, when you just wanted two values.
Sorry if this question is too insane, but I was wondering if tuples are really needed in Haskell. I mean, could tuples be generally replaced by variables unroll (f x y z) and explicit data types, or are there some things only possible to do via tuples?
Thx in advance (and sorry if this looks silly).
_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://www.haskell.org/mailman/listinfo/beginners