English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
pattern matching and records vs tuples
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-04-14 (16:00)
From: Christophe TROESTLER <Christophe.Troestler+ocaml@u...>
Subject: Re: [Caml-list] pattern matching and records vs tuples
On Tue, 14 Apr 2009 09:12:19 -0500, Yoann Padioleau wrote:
> I've found that while records provide advantages over tuples, 
> they also have disadvantages when it comes to evolution issues. 
> If I decide to evolve code using a tuple type, for instance adding
> new information and so extend a 4-uple in a 5-uple, then the compiler
> will tell me all the places that I need to update, which is good.
> If I use records instead, and have 4 fields, and I want to add again
> some new information in a new field, then the way the compiler works
> right now will not help me at all. 

See http://ocaml.janestreet.com/?q=node/31