From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q2PMjv93018035 for ; Mon, 26 Mar 2012 00:45:57 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkQCAMqfb0/ZSMD4k2dsb2JhbABDuCYiAQEBAQkJCwkUAySCCQEBBAE6RAsLGAklDwEEDRs0iAUJt3iJcYQTgyQEmz2FVIdl X-IronPort-AV: E=Sophos;i="4.73,648,1325458800"; d="scan'208";a="151141582" Received: from fmmailgate07.web.de ([217.72.192.248]) by mail1-smtp-roc.national.inria.fr with ESMTP; 26 Mar 2012 00:45:25 +0200 Received: from moweb002.kundenserver.de (moweb002.kundenserver.de [172.19.20.108]) by fmmailgate07.web.de (Postfix) with ESMTP id 8D41FFA8EE2 for ; Mon, 26 Mar 2012 00:45:25 +0200 (CEST) Received: from frosties.localnet ([95.208.118.96]) by smtp.web.de (mrweb002) with ESMTPA (Nemesis) id 0MTQ07-1Rjelu1uAZ-00SQnd; Mon, 26 Mar 2012 00:45:25 +0200 Received: from mrvn by frosties.localnet with local (Exim 4.77) (envelope-from ) id 1SBwBg-0006eY-NX for caml-list@inria.fr; Mon, 26 Mar 2012 00:45:24 +0200 From: Goswin von Brederlow To: caml-list@inria.fr References: <87fwcx6ejm.fsf@frosties.localnet> Date: Mon, 26 Mar 2012 00:45:24 +0200 In-Reply-To: (Lukasz Stafiniak's message of "Sat, 24 Mar 2012 19:42:10 +0100") Message-ID: <87398wwb97.fsf@frosties.localnet> User-Agent: Gnus/5.110009 (No Gnus v0.9) XEmacs/21.4.22 (linux, no MULE) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Provags-ID: V02:K0:iyoFREi/VS36E5aheuPZtbCpE0vmfVv8ZWK5kFcBQpz PY2Ioz73fZMeru3Ym0KgVYZanjJ5hJjtRpmQUzVEfgCLtlhrh/ nNJkO3NnRIAw7NG2mlm8eArmZ+sp/LmEWKwcKlh++PHLXPKQ7I ECoFIvKI15prV0kqzk/hd+lopJsaUm2tAiHMHAHPdRpTQfKvmB 3aIEJWSYJxv2E9yMCe8gA== Subject: Re: [Caml-list] Wish: mutable variant types, equivalence with records Lukasz Stafiniak writes: > On Sat, Mar 24, 2012 at 7:39 PM, Lukasz Stafiniak wrote: >> On Sat, Mar 24, 2012 at 7:32 PM, Lukasz Stafiniak wrote: >>> >>> I'm not sure about mutable but I'd appreciate labels :D >> >> As for syntax, I think that "unboxed anonymous records" would be better. > > For starters, one could make a Camlp4 extension that generates a > record type named "typ_Variant" for a type "typ" and its constructor > "Variant" whose fields are defined as a record. Hmm... Yes please. That wouldn't eliminate the risk of the two types getting out-of-sync and save keystrokes. > Record unboxing might be handled as an orthogonal issue? MfG Goswin