caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Jacques Carette <carette@mcmaster.ca>
To: Dario Teixeira <darioteixeira@yahoo.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Width subtyping
Date: Fri, 29 May 2009 10:21:11 -0400	[thread overview]
Message-ID: <4A1FEF57.1080905@mcmaster.ca> (raw)
In-Reply-To: <327446.80988.qm@web111511.mail.gq1.yahoo.com>

Dario Teixeira wrote:
> In other words, polymorphic variants provide a very elegant solution for subtyping
> with sum types.  Is there some brilliant idea that could do the same for product types?
>   
The dual of sums is products.  Open (labelled) sums are "polymorphic 
variants".  Their duals are open (labelled) products are "rows" (which 
O'Caml already supports, through its objects).

See TAPL for a nice introduction to the type theory of labelled records 
with subtyping (i.e. rows).

Jacques

PS: note that O'Caml's products are positional while its sums are 
labelled, so the duality present in the theory isn't as clear there.  
The better dual for O'Caml's sums is really records.


  reply	other threads:[~2009-05-29 14:22 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-29 14:10 Dario Teixeira
2009-05-29 14:21 ` Jacques Carette [this message]
2009-05-29 14:43 ` [Caml-list] " David Allsopp
2009-05-29 15:33 ` Richard Jones
2009-05-29 15:38 Dario Teixeira
2009-05-29 15:45 Dario Teixeira
2009-05-29 16:06 ` Till Varoquaux
2009-05-29 15:50 Dario Teixeira
2009-05-30 15:36 Dario Teixeira
2009-05-31  5:18 ` Dave Benjamin
2009-05-31  7:34   ` David Allsopp
2009-06-01  4:21   ` Jacques Garrigue
2009-05-31 23:08 Dario Teixeira
2009-06-01 11:34 ` Yaron Minsky
2009-06-01 13:56 Dario Teixeira
2009-06-01 14:21 ` David Allsopp
2009-06-01 17:04   ` Peng Zang

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=4A1FEF57.1080905@mcmaster.ca \
    --to=carette@mcmaster.ca \
    --cc=caml-list@yquem.inria.fr \
    --cc=darioteixeira@yahoo.com \
    /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).