Browse thread
Re: [Caml-list] Feature request : Tuples vs. records
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| 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. Rich. -- Richard Jones Red Hat UK Limited