From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id BAA5CBC57 for ; Thu, 5 Aug 2010 21:02:45 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtcCAAmoWkxDww+RkWdsb2JhbACDFZALg2eJTQEBAQEJCwoHEQMftgk7ghCGGIkCAQQEAYEhgyFzBIQg X-IronPort-AV: E=Sophos;i="4.55,324,1278280800"; d="scan'208";a="56783648" Received: from web111503.mail.gq1.yahoo.com ([67.195.15.145]) by mail2-smtp-roc.national.inria.fr with SMTP; 05 Aug 2010 21:02:35 +0200 Received: (qmail 30621 invoked by uid 60001); 5 Aug 2010 19:02:33 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1281034953; bh=ezvYUQhQcdCORHjjcPfc3GJV1M+xId5Fd93QotgfFGg=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=cHQbn2k0yjyhr/snCUbtF2cKA3mtozNeCU81UJPyf4oC4WAp8vpPhCvbGX0Qn2frEPbSnqA5QmDnOhxbt18WKidAIEJQmhovzg6AVlwWrrv1xd8qaMVtfIM25++ayd4ZV6EEHBw1h5YBzBy3qGH34dI9f1NC/q9VXthWIt+f4MQ= DomainKey-Signature:a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=aYFuKmIy1ANp9TT/zu+T7HCe4yTcqAXOPimL7j+md75MFyIoE1EhrByBwcWR9tpu4n0TzksAHPQfxV8Oa2nMyx9nR7fAoRx0VddapDiYSNNzilcU5yp9FpyJrA610vpxKhcYms4LhR5LcEKniOfq/g0h9V9p1IlZbpLwOt50Hqc=; Message-ID: <479559.30428.qm@web111503.mail.gq1.yahoo.com> X-YMail-OSG: UIpGy1kVM1kZWIaqFfRsNhvHXnQgswtRNPDTMoCZIleCkpE o7MIGgVTSae_eF1b3B5Opyu0285kj5tIEm23YPzevQPJhy1mVq3Ium9oukEv L0cRSMfibk6QaRmfoZ9w3LVnsQ8MDKhIBjMuMV0OwhXoT2ZN4dIhVp99x.wR dU88uC1_pMbOfV.IFVaNsg9uVevCSyEcORWsbIa8cSwLEmzyMtgMLnuigxn6 miZQt8EZYbFqiX.hU0ErFrwD.IreURGS6ae_8Gr1mFFi1S2u.EA3FMFKLU1L CtOGZQTvURFI2MQYC0t3gGByqDKShNfvLIUwG3Rn0.XA9pn7FKsmcwj1lABu Jr9VpZBQyFoGr18y3uplx Received: from [213.205.71.51] by web111503.mail.gq1.yahoo.com via HTTP; Thu, 05 Aug 2010 12:02:33 PDT X-Mailer: YahooMailClassic/11.3.2 YahooMailWebService/0.8.105.279950 Date: Thu, 5 Aug 2010 12:02:33 -0700 (PDT) From: Dario Teixeira Subject: Re: [Caml-list] Emulating width subtyping with 1st-class modules To: Alain Frisch Cc: caml-list@yquem.inria.fr In-Reply-To: <4C5AE867.9070908@frisch.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; subtyping:01 camlp:01 compiler:01 ocaml:01 subtyping:01 variants:01 cheers:01 ocaml:01 polymorphic:01 syntactic:01 caml-list:01 modules:02 width:97 width:97 native:03 Hi,=0A=0A> It depends on what you call "heavy". For the syntactic=0A> aspec= ts, as you say, Camlp4 can be helpful. One could also=0A> imagine future ex= tensions in the compiler itself, e.g.:=0A=0AI meant "heavy" performance-wis= e, which you've also clarified -- thanks!=0A=0AIncidentally, has the Ocaml = team ever entertained adding native support=0Afor a record type with width = subtyping? From my type-theory-non-expert=0Apoint of view, what strikes me= about width subtyping is how closely related=0Ait seems to the structural = subtyping found in the object system and in=0Apolymorphic variants. It wou= ld therefore fit very nicely along those=0Afeatures. Perhaps it could even= leverage the same row variable mechanism.=0A=0AWhile 1st-class-modules add= yet another user-space solution to the width=0Asubtyping problem (the othe= r prominent approaches being the object system=0Aand Jacques Garrigue's Pol= ymap [1]), these user-space solutions always=0Aimply some -- albeit small -= - price to pay performance-wise.=0A=0ACheers,=0ADario Teixeira=0A=0A[1] htt= p://www.math.nagoya-u.ac.jp/~garrigue/code/ocaml.html=0A=0A=0A=0A