From: Dario Teixeira <darioteixeira@yahoo.com>
To: Alain Frisch <alain@frisch.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Emulating width subtyping with 1st-class modules
Date: Thu, 5 Aug 2010 12:02:33 -0700 (PDT) [thread overview]
Message-ID: <479559.30428.qm@web111503.mail.gq1.yahoo.com> (raw)
In-Reply-To: <4C5AE867.9070908@frisch.fr>
Hi,
> It depends on what you call "heavy". For the syntactic
> aspects, as you say, Camlp4 can be helpful. One could also
> imagine future extensions in the compiler itself, e.g.:
I meant "heavy" performance-wise, which you've also clarified -- thanks!
Incidentally, has the Ocaml team ever entertained adding native support
for a record type with width subtyping? From my type-theory-non-expert
point of view, what strikes me about width subtyping is how closely related
it seems to the structural subtyping found in the object system and in
polymorphic variants. It would therefore fit very nicely along those
features. Perhaps it could even leverage the same row variable mechanism.
While 1st-class-modules add yet another user-space solution to the width
subtyping problem (the other prominent approaches being the object system
and Jacques Garrigue's Polymap [1]), these user-space solutions always
imply some -- albeit small -- price to pay performance-wise.
Cheers,
Dario Teixeira
[1] http://www.math.nagoya-u.ac.jp/~garrigue/code/ocaml.html
prev parent reply other threads:[~2010-08-05 19:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-05 15:02 Dario Teixeira
2010-08-05 16:10 ` [Caml-list] " Philippe Veber
2010-08-05 16:17 ` Alain Frisch
2010-08-05 16:35 ` Alain Frisch
2010-08-05 19:02 ` Dario Teixeira [this message]
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=479559.30428.qm@web111503.mail.gq1.yahoo.com \
--to=darioteixeira@yahoo.com \
--cc=alain@frisch.fr \
--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