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:43)
From: Till Varoquaux <till.varoquaux@g...>
Subject: Re: [Caml-list] Feature request : Tuples vs. records
I also agree:
IMHO , it woud feel natural to have
 open .. in (* <-- there's already a camlp4 extension that brings this*)
 type ... in
it would be coherent with the let syntax. However I don't know the
deep implications of such a change and happen to be very prompt
criticizing. I'm sure there is a profound reason for the language not
be like this.


On 2/23/07, Richard Jones <rich@annexia.org> wrote:
> 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.
> Rich.
> --
> Richard Jones
> Red Hat UK Limited
> _______________________________________________
> Caml-list mailing list. Subscription management:
> http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
> Archives: http://caml.inria.fr
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs