Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] How to read three integers from a text-file... ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Francois Pottier <francois.pottier@i...>
Subject: Re: [Caml-list] Extensible tuple types

On Thu, May 02, 2002 at 11:42:35AM +0200, Alain Frisch wrote:
> I don't understand what this encoding of extensible tuples allows,
> compared to the simple minded solution [the type of an n-typle is
> (t1,(t2,...(tn,unit)...)) ]

You're right -- and I should think more before I write -- it's
essentially the same solution. You do need to distinguish the
kind of sequences from the kind of types, though (that is, to
distinguish sequence extension ; from the product * and the
empty sequence nil from the unit type), otherwise you can't
distinguish a tuple from a cascade of pairs. But, apart from
that, you're right, it's the same thing.

François Pottier
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: