From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.2 required=5.0 tests=AWL,DNS_FROM_RFC_POST, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 8EC87BBC4 for ; Wed, 15 Apr 2009 09:41:59 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcCAL4r5UlKfSwckGdsb2JhbACVUT8BAQEBCQkMBxEDqXKBCZBLAQMBA4N7Bg X-IronPort-AV: E=Sophos;i="4.40,191,1238968800"; d="scan'208";a="26269650" Received: from yx-out-2324.google.com ([74.125.44.28]) by mail3-smtp-sop.national.inria.fr with ESMTP; 15 Apr 2009 09:41:58 +0200 Received: by yx-out-2324.google.com with SMTP id 8so1681103yxb.27 for ; Wed, 15 Apr 2009 00:41:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=nfbOy21LOsxAiLHnnsIS+Sr5VzWlBsNu8fHcRsmi0l8=; b=VfacK3ZPa97oyHLqgtIcHGNsaSv8CBqRwCrOMHb8DeX4w6HlUO5mnWx+02PMvAY5t5 KfLvrmQ4O5renTpeQrxvWumBhM/FArf8ORYWe8UP7VyfFLW1XgHjh1KN8PAu2zE+dV7b fD9Qz5fP/bwYWwlTBBiRdYVMHyaavCWDs/RL8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=OgTxscpCQCX2/doH6rTep/KBct526HViZ3qzui4RToQr2t3mZTSDyRSSqIo1mhFR6A 2A9fu13K8gp9/mvRnPYkUEGZt9y+o55Bdj5UeMbdz7XYpYXNNvsOww60NBRqw1phV5+/ Tci5dXHf/WITV0jCtj6jg/kyaRZIny2il9IOE= MIME-Version: 1.0 Received: by 10.150.206.1 with SMTP id d1mr16485991ybg.165.1239781318319; Wed, 15 Apr 2009 00:41:58 -0700 (PDT) In-Reply-To: <891bd3390904141744k4516f3d0y551f6c572ccadad5@mail.gmail.com> References: <87skkbuxx8.fsf@aryx.cs.uiuc.edu> <891bd3390904141744k4516f3d0y551f6c572ccadad5@mail.gmail.com> Date: Wed, 15 Apr 2009 09:41:58 +0200 Message-ID: <527cf6bc0904150041u7fa9e30dt3c5b5b8b0ab67ebf@mail.gmail.com> Subject: Re: [Caml-list] pattern matching and records vs tuples From: blue storm To: yminsky@gmail.com Cc: Yoann Padioleau , caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; yaron:01 minsky:01 yminsky:01 foo:01 foo:01 syntax:01 post-:01 camlp:01 oandrieu:01 ocaml:01 storm:98 2009:98 wrote:01 caml-list:01 tuples:01 On Wed, Apr 15, 2009 at 2:44 AM, Yaron Minsky wrote: > Another thought I've had for making record matches lighter is to do the s= ame > kind of trick that's done with labeled arguments, i.e., have > > =A0=A0 let { foo; bar } =3D x > > bind the variable foo to the x.foo, and bind bar to x.bar. That part is achieved by the pa_records [1] syntax extension. To my knowledge, it has not been port to post-3.10 camlp4 yet, but if you're interested, I could probably do it. [1] http://oandrieu.nerim.net/ocaml/#pa_records