caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Lukasz Stafiniak" <lukstafi@gmail.com>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Feature request : Tuples vs. records
Date: Sat, 24 Feb 2007 14:43:26 +0100	[thread overview]
Message-ID: <4a708d20702240543w4c9d0a91tb12c13b10254a68b@mail.gmail.com> (raw)
In-Reply-To: <4a708d20702230832m4e143586i6036980ead10042a@mail.gmail.com>

On 2/23/07, Lukasz Stafiniak <lukstafi@gmail.com> wrote:
> On 2/23/07, Jon Harrop <jon@ffconsultancy.com> wrote:
> > On Thursday 22 February 2007 16:16, David Teller wrote:
> > > I'm more concerned about having to
> > > * declare every record type I use -- that looks to me clumsy and Java-like
> > > * differenciate between records and tuples during pattern-matching
> >
> > The same can be said of ordinary and polymorphic variants. You must declare
> > ordinary variants. You must distinguish between the two in patterns.
> >
I have this idea... We could have row polymorphism in tuples, without
any impact on performance! Instead of insisting that ('a * 'b) means
exactly two elements, we could have (> 'a * 'b) at least two elements.
Any projections or pattern matching fetches the tuple fields without
problems: it doesn't need to care that there are more than it needs.

Say you realize that you need to return another value from a function
(which already returns a tuple): you would only modify the function
and not its uses.


  reply	other threads:[~2007-02-24 13:43 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-22 15:34 Frederic GAVA
2007-02-22 16:16 ` David Teller
2007-02-23  1:39   ` Jacques Garrigue
2007-02-23 13:34     ` Richard Jones
2007-02-23 13:43       ` Till Varoquaux
2007-02-23 14:14         ` Nicolas Pouillard
2007-02-23  1:45   ` Jon Harrop
2007-02-23 16:32     ` Lukasz Stafiniak
2007-02-24 13:43       ` Lukasz Stafiniak [this message]
2007-02-24 15:50         ` Brian Hurt
2007-02-24 18:14           ` skaller
  -- strict thread matches above, loose matches on Subject: below --
2007-02-22 10:25 David Teller
2007-02-22 10:42 ` [Caml-list] " Andrej Bauer
2007-02-22 12:41   ` skaller
2007-02-22 13:55     ` David Teller
2007-02-22 15:44       ` Jon Harrop
2007-02-22 19:45       ` Tom
2007-02-22 23:26         ` skaller
2007-02-22 15:28     ` Andreas Rossberg
2007-02-22 15:57       ` Till Varoquaux
     [not found]         ` <45DDC424.2020804@ens-lyon.org>
2007-02-22 16:57           ` Till Varoquaux
2007-02-22 17:19             ` brogoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4a708d20702240543w4c9d0a91tb12c13b10254a68b@mail.gmail.com \
    --to=lukstafi@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).