From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id C43F07EE4B for ; Thu, 10 Oct 2013 22:23:06 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rathereasy@gmail.com) identity=pra; client-ip=209.85.160.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rathereasy@gmail.com"; x-sender="rathereasy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of rathereasy@gmail.com designates 209.85.160.51 as permitted sender) identity=mailfrom; client-ip=209.85.160.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rathereasy@gmail.com"; x-sender="rathereasy@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-pb0-f51.google.com) identity=helo; client-ip=209.85.160.51; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rathereasy@gmail.com"; x-sender="postmaster@mail-pb0-f51.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AskCAIkLV1LRVaAzlGdsb2JhbABZhAUMgmO+UIEeCBYOAQEBAQcLCwkSKoIcCQEBBAEnGQEbHQEDAQsGBQMBBzshAQERAQUBHAYTh3MBAwkGnA2MVYMKhB0KGScNZIkBAQUMjE6CbQeEIwOWHIFpjEyDSxgphGog X-IPAS-Result: AskCAIkLV1LRVaAzlGdsb2JhbABZhAUMgmO+UIEeCBYOAQEBAQcLCwkSKoIcCQEBBAEnGQEbHQEDAQsGBQMBBzshAQERAQUBHAYTh3MBAwkGnA2MVYMKhB0KGScNZIkBAQUMjE6CbQeEIwOWHIFpjEyDSxgphGog X-IronPort-AV: E=Sophos;i="4.90,1074,1371074400"; d="scan'208";a="36472058" Received: from mail-pb0-f51.google.com ([209.85.160.51]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 10 Oct 2013 22:23:04 +0200 Received: by mail-pb0-f51.google.com with SMTP id jt11so3135621pbb.10 for ; Thu, 10 Oct 2013 13:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=cq+ARwx1niBn3t4beo/6Kyy0gZpi3b96HkVMHhy6eYs=; b=wxhPXfGTMA+0RnniEMMZzAE1EiF+OF5r8PmJcsLh1h49kfUWEOpyOL6NI73q+tUh/S 98UwaDD0tNIdoBjkKaCeLOrHQBgNHVYpyks6+c5PqLf4pdghheylJ5vVyTVh7g1XKj9R 5/VIS2nkIO90jZjpuym17iKGHiR4oKsW3wP/8H06JjjKgIzio/qwfn95lrfwWJHURf+Z qrVRY60r2qKR6NQsYx7OuHzVUoYpAtjsqT366utkLbgsDXJOudotnoV+bex9QTn2rL9h tfLTeGrwOJuXwxv2Z3OCS0nyK2yd6rbz9GcAKwAnT3bo9wJOqtJ5ohsWh9AF0DCqeutp tA6w== MIME-Version: 1.0 X-Received: by 10.68.59.38 with SMTP id w6mr15767379pbq.135.1381436584465; Thu, 10 Oct 2013 13:23:04 -0700 (PDT) Received: by 10.70.9.37 with HTTP; Thu, 10 Oct 2013 13:23:04 -0700 (PDT) Received: by 10.70.9.37 with HTTP; Thu, 10 Oct 2013 13:23:04 -0700 (PDT) In-Reply-To: References: Date: Thu, 10 Oct 2013 16:23:04 -0400 Message-ID: From: Jacques Le Normand To: Yotam Barnoy Cc: caml Content-Type: multipart/alternative; boundary=bcaec5304f57e59f5704e868c497 Subject: Re: [Caml-list] Pattern matching on refs --bcaec5304f57e59f5704e868c497 Content-Type: text/plain; charset=ISO-8859-1 I like this syntactic sugar. Simple, easy to implement and useful; especially when dealing with other people's code. On Oct 10, 2013 3:18 PM, "Yotam Barnoy" wrote: > I recently found out how ugly it is to pattern-match on a ref, using > {contents=...}. This should be extremely easy to fix in the parser. Can it > please be put into the next version of ocaml? > ie. > > match x with > | ref y -> ... > > -Yotam > --bcaec5304f57e59f5704e868c497 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

I like this syntactic sugar. Simple, easy to implement and u= seful; especially when dealing with other people's code.

On Oct 10, 2013 3:18 PM, "Yotam Barnoy"= ; <yotambarnoy@gmail.com>= ; wrote:
I recently found out how ugly it is to= pattern-match on a ref, using {contents=3D...}. This should be extremely e= asy to fix in the parser. Can it please be put into the next version of oca= ml?
ie.

match x with
| ref y -> ...

-Yotam
--bcaec5304f57e59f5704e868c497--