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 DC8467FD26 for ; Fri, 6 Nov 2015 13:34:52 +0100 (CET) IronPort-PHdr: 9a23:fm6A8BEgjoM0wUYF6KuFTp1GYnF86YWxBRYc798ds5kLTJ74psywAkXT6L1XgUPTWs2DsrQf27eQ6/iocFdDyKjCmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TWM5DIfUi/yKRBybrysXNWC0oLvj6ibwN76XUZhvHKFe7R8LRG7/036l/I9ps9cEJs30QbDuXBSeu5blitCLFOXmAvgtI/rpMYwuwwZgf8q9tZBXKPmZOx4COUAVHV1BVso/9XmvgXvSg6G531UEjlH00kAPw+Qpir9U5jtqCzi8qJY2SKaNMDyB/hgXDWp765mTFnzjyoIKyQ+6EnWjNB9iORQpxf39DJlxIuBT4ifLvtzeuvmdtMXX2dbFpJeXiZbA464KZAED+cbMPxwoIz0pl9Iphy7U1r/TNjzwyNF0yellZYx1P4sRESbhQE= Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=gabriel.scherer@gmail.com; spf=Pass smtp.mailfrom=gabriel.scherer@gmail.com; spf=None smtp.helo=postmaster@mail-ig0-f175.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of gabriel.scherer@gmail.com) identity=pra; client-ip=209.85.213.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="gabriel.scherer@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of gabriel.scherer@gmail.com designates 209.85.213.175 as permitted sender) identity=mailfrom; client-ip=209.85.213.175; receiver=mail2-smtp-roc.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 (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ig0-f175.google.com) identity=helo; client-ip=209.85.213.175; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="gabriel.scherer@gmail.com"; x-sender="postmaster@mail-ig0-f175.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AsAQDRnTxWlK/VVdFeg1o0bwatB4FPhTCMBxcBCYVvAoEyBzwQAQEBAQEBAQEQAQEBAQcLCwkfMIIugggBAQMBEhEdAQgTEgsBAwELBgULGh0CAiIBEQEFAQoSBhMSEId2AQMKCA2iWYExPjGLSIFqgnmGfwoZJwMKVoNoAQEBAQEBBAEBAQEBAQEBFQEFDoZGg3iBBoUIgjMMLhOBMQWGCwyQMYUdiAeBW0mWLoIlEiSBFxEngi8jgV49NIUUAQEB X-IPAS-Result: A0AsAQDRnTxWlK/VVdFeg1o0bwatB4FPhTCMBxcBCYVvAoEyBzwQAQEBAQEBAQEQAQEBAQcLCwkfMIIugggBAQMBEhEdAQgTEgsBAwELBgULGh0CAiIBEQEFAQoSBhMSEId2AQMKCA2iWYExPjGLSIFqgnmGfwoZJwMKVoNoAQEBAQEBBAEBAQEBAQEBFQEFDoZGg3iBBoUIgjMMLhOBMQWGCwyQMYUdiAeBW0mWLoIlEiSBFxEngi8jgV49NIUUAQEB X-IronPort-AV: E=Sophos;i="5.20,252,1444687200"; d="scan'208";a="186389894" Received: from mail-ig0-f175.google.com ([209.85.213.175]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 06 Nov 2015 13:34:51 +0100 Received: by igbhv6 with SMTP id hv6so32674419igb.0; Fri, 06 Nov 2015 04:34:51 -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=nWa3TG0UY7nDYPiMFgM00glFjphyaWeyDh62WlcJ+Kk=; b=cnUnAdLHqxeY0UxlpTs+tTjDrS9QzkqWebitMqbTkljS8JvEgfQ1A5n0LVJsVqEmfm OJt0gdy38y1G0i/sqejr3sgUBrCGR/H5SA4VTtvDdG9t2ycBvWGFMY0NZmGfWCbitF93 cy0MpcX+yHlP/7OMYwzev1YgdQLJQwPa8EMqPtmVHlkbsinPPSDbRzdK1gOaw1WmZfoP H5NBPZiZiD0PCoFfMMIlXbH5psiqvn43UzsnWwzvrIvswf5tiJJYhzwJPMMdICzdTJ7U 6aMNlXgDTJspmez5bhq1DsvJ0KKjMtgEh8TJFiflNBVNfZ6y8haArD89Y6Xn4OECk71L kJEA== X-Received: by 10.50.164.196 with SMTP id ys4mr8861745igb.37.1446813290832; Fri, 06 Nov 2015 04:34:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.79.39.200 with HTTP; Fri, 6 Nov 2015 04:34:11 -0800 (PST) In-Reply-To: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E0E1@IRSMSX102.ger.corp.intel.com> References: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E070@IRSMSX102.ger.corp.intel.com> <563C816B.7020604@inria.fr> <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E0E1@IRSMSX102.ger.corp.intel.com> From: Gabriel Scherer Date: Fri, 6 Nov 2015 13:34:11 +0100 Message-ID: To: "Soegtrop, Michael" Cc: Francois Berenger , "caml-list@inria.fr" Content-Type: multipart/alternative; boundary=089e01494c3241a9000523de7822 Subject: Re: [Caml-list] Newbie comment on constructor syntax --089e01494c3241a9000523de7822 Content-Type: text/plain; charset=UTF-8 The use of camlp{4,5} to change OCaml syntax has always had extremely low adoption, with some very specific exceptions (notably the lwt-support syntax of the Ocsigen project). I suspect that this is due to the fact that integrating a new syntax extension to your project has historically caused more build-system and deployment trouble than people were willing to tolerate. ppx extensions are not designed to allow extending the OCaml syntax, and in particular I think they are not a good fit for what you are looking for. It is a large part of their appeal: by being less flexible, they are simpler and more robust. I personally believe that currified constructor syntax would be a better choice, and that using non-currified constructors is a historical mistake of SML/Caml. But I am also not convinced that efforts to change it today are worth the trouble, and prefer to concentrate on improving other parts of the OCaml ecosystem. Another thing that was touched by your comments is the usefulness of user-defined patterns (pattern synonyms). I have conflicted opinions on the question of whether adding pattern synonyms would be a good thing, but described one aspect of a proposal that I like (but also highlights that the feature can be a source of implementation complexity) in http://gallium.inria.fr/blog/pattern-synonyms-as-expressions/ On Fri, Nov 6, 2015 at 1:20 PM, Soegtrop, Michael < michael.soegtrop@intel.com> wrote: > Dear Francois, > > > let constr a b = Constr (a, b) > > unfortunately this won't work for matches. I will see if I get used to > this. If not I will take this as a reason to learn p5 and/or ppx :-) > > Best regards, > > Michael > Intel Deutschland GmbH > Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany > Tel: +49 89 99 8853-0, www.intel.de > Managing Directors: Christin Eisenschmid, Christian Lamprechter > Chairperson of the Supervisory Board: Nicole Lau > Registered Office: Munich > Commercial Register: Amtsgericht Muenchen HRB 186928 > > > -- > 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 > --089e01494c3241a9000523de7822 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The use of camlp{4,5} to change OCaml synta= x has always had extremely low adoption, with some very specific exceptions= (notably the lwt-support syntax of the Ocsigen project). I suspect that th= is is due to the fact that integrating a new syntax extension to your proje= ct has historically caused more build-system and deployment trouble than pe= ople were willing to tolerate.

ppx extensions are not designed= to allow extending the OCaml syntax, and in particular I think they are no= t a good fit for what you are looking for. It is a large part of their appe= al: by being less flexible, they are simpler and more robust.

= I personally believe that currified constructor syntax would be a better ch= oice, and that using non-currified constructors is a historical mistake of = SML/Caml. But I am also not convinced that efforts to change it today are w= orth the trouble, and prefer to concentrate on improving other parts of the= OCaml ecosystem.

Another thing that was touched by your comme= nts is the usefulness of user-defined patterns (pattern synonyms). I have c= onflicted opinions on the question of whether adding pattern synonyms would= be a good thing, but described one aspect of a proposal that I like (but a= lso highlights that the feature can be a source of implementation complexit= y) in
=C2=A0 http://gallium.inria.fr/blog/pattern-synonyms-as-expressions= /

On= Fri, Nov 6, 2015 at 1:20 PM, Soegtrop, Michael <michael.soegtrop= @intel.com> wrote:
Dear Fra= ncois,

> let constr a b =3D Constr (a, b)

unfortunately this won't work for matches. I will see if I get u= sed to this. If not I will take this as a reason to learn p5 and/or ppx :-)=

Best regards,

Michael
Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89= 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928


--
Caml-list mailing list.=C2= =A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocam= l_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--089e01494c3241a9000523de7822--