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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id D24B47F6D8 for ; Mon, 19 Jan 2015 09:34:05 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=pra; client-ip=85.233.204.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of alain@frisch.fr) identity=mailfrom; client-ip=85.233.204.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="alain@frisch.fr"; x-conformance=sidf_compatible Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mx20.yaziba.net) identity=helo; client-ip=85.233.204.164; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="alain@frisch.fr"; x-sender="postmaster@mx20.yaziba.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Aq8AAFvAvFRV6cyknGdsb2JhbABb0FMCgR1DAQEBAQERAQEBAQEICwkJFC6EDAEBAQMBOEAGCwsYCRYPCQMCAQIBRQcMBgIBAReICQzOdQEBCAIBH5AAhCkBBJdwgRSCfIIfg2uIDgKEEW6CQwEBAQ X-IPAS-Result: Aq8AAFvAvFRV6cyknGdsb2JhbABb0FMCgR1DAQEBAQERAQEBAQEICwkJFC6EDAEBAQMBOEAGCwsYCRYPCQMCAQIBRQcMBgIBAReICQzOdQEBCAIBH5AAhCkBBJdwgRSCfIIfg2uIDgKEEW6CQwEBAQ X-IronPort-AV: E=Sophos;i="5.09,425,1418079600"; d="scan'208";a="96856595" Received: from mx20.yaziba.net ([85.233.204.164]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 19 Jan 2015 09:34:04 +0100 Received: from mta10.int.yaziba.net (unknown [10.4.20.30]) by mx20.yaziba.net (mx10.yaziba.net) with ESMTP id B59151A73C7; Mon, 19 Jan 2015 09:34:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id B76FBCA732; Mon, 19 Jan 2015 09:34:03 +0100 (CET) X-Virus-Scanned: amavisd-new at mta10.int.yaziba.net Received: from mta10.int.yaziba.net ([127.0.0.1]) by localhost (mta10.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sb6K8SpnScVa; Mon, 19 Jan 2015 09:34:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by mta10.int.yaziba.net (Postfix) with ESMTP id 8267DCA684; Mon, 19 Jan 2015 09:34:03 +0100 (CET) X-Virus-Scanned: amavisd-new at mta10.int.yaziba.net Received: from mta10.int.yaziba.net ([127.0.0.1]) by localhost (mta10.int.yaziba.net [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id hAbsdwLNAtDl; Mon, 19 Jan 2015 09:34:03 +0100 (CET) Received: from [10.0.48.154] (unknown [185.23.92.144]) by mta10.int.yaziba.net (Postfix) with ESMTPSA id 4A4F3CA695; Mon, 19 Jan 2015 09:34:03 +0100 (CET) Message-ID: <54BCC17A.4000802@frisch.fr> Date: Mon, 19 Jan 2015 09:34:02 +0100 From: Alain Frisch User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: oleg@okmij.org, jun.furuse@gmail.com, caml-list@inria.fr References: <20150119073303.038ECC38BA@www1.g3.pair.com> In-Reply-To: <20150119073303.038ECC38BA@www1.g3.pair.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-DRWEB-SCAN: ok X-VRSPAM-SCORE: 0 X-VRSPAM-STATE: legit X-VRSPAM-CAUSE: gggruggvucftvghtrhhoucdtuddrfeejjedrjeehgddtjecutefuodetggdotefrucfrrhhofhhilhgvmecuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedttdenucenucfjughrpefkfffhfgggvffufhgjtgfgsehtjegrtddtfeehnecuhfhrohhmpeetlhgrihhnucfhrhhishgthhcuoegrlhgrihhnsehfrhhishgthhdrfhhrqe X-VRSPAM-EXTCAUSE: mhhouggvpehsmhhtphhouhht X-Validation-by: alain.frisch@lexifi.com Subject: Re: [Caml-list] [ANN] ppx_monadic.1.0.2, ppx for monadic do, On 01/19/2015 08:33 AM, oleg@okmij.org wrote: >> Current OCaml syntax has shortage of pattern binding expression and >> only usable is let%xxx p = e in which is a bit pain for ppx writers. > > Indeed. One may wish that > > let rec p = e1 in e2 > > were treated as if it were > let[@ocaml.let "rec"] p = e1 in e2 > > and likewise let module. Please, no! Attributes are intended to add meta-data for external tools (ppx, tools parsing .cmt files, etc), perhaps also to tweak the behavior of the compiler (trigger/control warnings, etc), certainly not to encode core language features (otherwise, let's use s-expressions instead of Parsetree). Facilitating language experiments is also a good use for attributes, but not as a long-term solution for the official compiler. > Come to think of it, 'rec! or 'module' are > annotations on let. "let module" has a different shape (module identifiers/types/expressions) than "let". And it doesn't seem realistic to merge, say, core types and module types, or core expressions and module expressions. Alain