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
Re: [Caml-list] Feature request : Tuples vs. records
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-02-23 (13:34)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Feature request : Tuples vs. records
On Fri, Feb 23, 2007 at 10:39:45AM +0900, Jacques Garrigue wrote:
> On the other hand structural typing avoids extra definitions, and
> allows more code sharing and polymorphism. One cannot imagine ML
> without structural tuples. In ocaml, you have also objects that can
> mimic records, and polymorphic variants for sum types.

The penalty of having the extra definitions wouldn't be so bad if
'type t = ...' could appear inside let statements (ie. not just at the
top level).  At the moment, type definitions are often a long way away
from where they are used.


Richard Jones
Red Hat UK Limited