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 5ED4A7FB68 for ; Mon, 19 Jan 2015 10:07:26 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.214.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.214.172 as permitted sender) identity=mailfrom; client-ip=209.85.214.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ob0-f172.google.com) identity=helo; client-ip=209.85.214.172; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ob0-f172.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AuYAAMzIvFTRVdaslWdsb2JhbABbg1hcgwKzWY1qgWmFcQKBGQdDAQEBAQERAQEBAQcNCQkSMIQMAQEBAwESER0BGxILAQMBCwYDAgQHDQ0dAgIiAREBBQEKEgYTEgkHh3UBAwkIDZ4RkE8+MYsugWuCd4oNChknAwpUg0gBAQEBAQEEAQEBAQEBAQEUAQUOj2cEB4JogUEFhD4GiDaFJoVQgRQ2gkaGCoZGEiOBDAmBfYIUPTGCQwEBAQ X-IPAS-Result: AuYAAMzIvFTRVdaslWdsb2JhbABbg1hcgwKzWY1qgWmFcQKBGQdDAQEBAQERAQEBAQcNCQkSMIQMAQEBAwESER0BGxILAQMBCwYDAgQHDQ0dAgIiAREBBQEKEgYTEgkHh3UBAwkIDZ4RkE8+MYsugWuCd4oNChknAwpUg0gBAQEBAQEEAQEBAQEBAQEUAQUOj2cEB4JogUEFhD4GiDaFJoVQgRQ2gkaGCoZGEiOBDAmBfYIUPTGCQwEBAQ X-IronPort-AV: E=Sophos;i="5.09,425,1418079600"; d="scan'208";a="96862333" Received: from mail-ob0-f172.google.com ([209.85.214.172]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Jan 2015 10:07:25 +0100 Received: by mail-ob0-f172.google.com with SMTP id wp18so6779534obc.3 for ; Mon, 19 Jan 2015 01:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=hXWHmjFO8ireUCMPDP/VeXfZp9XR/Eh4OHPRSBuurhE=; b=qUf/y1ffYnYiSFN5V4Q+yzrY03NjbCNjxDJYLFkk44bVyo+goLpKyCybrQc0eWvCP3 88SBfDHhk+3cyhH71JK97XlMT9SXio7qZB3PgNxTayC4FUinpNi1zKRHWeDlJPlMTUlT 87m4QgKrvmheUZE1N4K8piNPCvSnt1h81iVtLkEec5ruEPRL5ytN3msIFQuURpatfQBr xCsivGsgDAt0762hVMaJTWUu+hTdPhRwaKxPh82adLNf+VzuVPSxv/mlIZE6NxQEsktu qIr3QFQRtnxyuv8p2p+KwtPcPGQLMwXPvLyUTxtf0tYheqtNQ8zkXdliXRTl743/QqeZ UbEQ== X-Received: by 10.202.49.73 with SMTP id x70mr13222oix.17.1421658444261; Mon, 19 Jan 2015 01:07:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.76.76.39 with HTTP; Mon, 19 Jan 2015 01:06:43 -0800 (PST) In-Reply-To: <54BCC17A.4000802@frisch.fr> References: <20150119073303.038ECC38BA@www1.g3.pair.com> <54BCC17A.4000802@frisch.fr> From: Gabriel Scherer Date: Mon, 19 Jan 2015 10:06:43 +0100 Message-ID: To: Alain Frisch Cc: oleg@okmij.org, Jun Furuse , caml users Content-Type: multipart/alternative; boundary=001a113cd80e8fef71050cfda624 Subject: Re: [Caml-list] [ANN] ppx_monadic.1.0.2, ppx for monadic do, --001a113cd80e8fef71050cfda624 Content-Type: text/plain; charset=UTF-8 (On the other hand, the remark that the existing uses of keyword-bang in the language, namely (method!) and (open!), could now be represented as annotations is fairly reasonable.) On Mon, Jan 19, 2015 at 9:34 AM, Alain Frisch wrote: > 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 > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > --001a113cd80e8fef71050cfda624 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
(On the other hand, the remark that the existing uses of k= eyword-bang in the language, namely (method!) and (open!), could now be rep= resented as annotations is fairly reasonable.)

On Mon, Jan 19, 2015 at 9:34 AM, Ala= in Frisch <alain@frisch.fr> wrote:
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 =3D e in which is a bit pain for ppx writers.

Indeed. One may wish that

=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0let rec p =3D e1 in e2

were treated as if it were
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0let[@ocaml.let "rec"] p =3D e1 = in e2

and likewise let module.

Please, no!=C2=A0 Attributes are intended to add meta-data for external too= ls (ppx, tools parsing .cmt files, etc), perhaps also to tweak the behavior= of the compiler (trigger/control warnings, etc), certainly not to encode c= ore language features (otherwise, let's use s-expressions instead of Pa= rsetree).=C2=A0 Facilitating language experiments is also a good use for at= tributes, 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/expr= essions) than "let".=C2=A0 And it doesn't seem realistic to m= erge, say, core types and module types, or core expressions and module expr= essions.


Alain

--001a113cd80e8fef71050cfda624--