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 ACBED82355 for ; Wed, 13 Dec 2017 20:30:06 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=yawar.amin@gmail.com; spf=Pass smtp.mailfrom=yawar.amin@gmail.com; spf=None smtp.helo=postmaster@mail-it0-f43.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yawar.amin@gmail.com) identity=pra; client-ip=209.85.214.43; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yawar.amin@gmail.com"; x-sender="yawar.amin@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of yawar.amin@gmail.com designates 209.85.214.43 as permitted sender) identity=mailfrom; client-ip=209.85.214.43; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yawar.amin@gmail.com"; x-sender="yawar.amin@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-it0-f43.google.com) identity=helo; client-ip=209.85.214.43; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yawar.amin@gmail.com"; x-sender="postmaster@mail-it0-f43.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3A8LCDIBdSqCwM+aAah0ABqzdGlGMj4u6mDksu8pMi?= =?us-ascii?q?zoh2WeGdxcS+YB7h7PlgxGXEQZ/co6odzbaO6ua4ASQp2tWoiDg6aptCVhsI24?= =?us-ascii?q?09vjcLJ4q7M3D9N+PgdCcgHc5PBxdP9nC/NlVJSo6lPwWB6nK94iQPFRrhKAF7?= =?us-ascii?q?Ovr6GpLIj8Swyuu+54Dfbx9HiTahfL9+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=?us-ascii?q?Q34TRtW6y8CoKWd4myiabJ9SK6GNUCd2lZA0rKGHLpca2LXv4NbGSZJco3wW9M?= =?us-ascii?q?bqSoV4J0jULmjwT90bcya7eN9w=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CZAAATfzFahivWVdFdGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYMPgRV0FBMHg3uBNpdwgX2CY45hh2IKI4UYAoUMB0MUAQEBAQE?= =?us-ascii?q?BAQEBARIBAQEICwsIKC+COCSCRwEBAQECASMdARsSCwEDAQsGBQsNDR0CAiEBA?= =?us-ascii?q?REBBQEKEgYTEol9AQMNCBCcHkCMEIIFBQEcgwsFg18KGScDClmCPwEBAQEBAQQ?= =?us-ascii?q?BAQEBAQEBGQIGEoNOgguBVoQGgQ6CajkMghuCaIJjBYhbDIpBjzo9gjmFQogvh?= =?us-ascii?q?H2CeZBvjRA9iQUUBR+BFw8ngXAyGiNPMoF3CYIQKh+CESM3ijoBAQE?= X-IPAS-Result: =?us-ascii?q?A0CZAAATfzFahivWVdFdGQEBAQEBAQEBAQEBAQcBAQEBAYM?= =?us-ascii?q?PgRV0FBMHg3uBNpdwgX2CY45hh2IKI4UYAoUMB0MUAQEBAQEBAQEBARIBAQEIC?= =?us-ascii?q?wsIKC+COCSCRwEBAQECASMdARsSCwEDAQsGBQsNDR0CAiEBAREBBQEKEgYTEol?= =?us-ascii?q?9AQMNCBCcHkCMEIIFBQEcgwsFg18KGScDClmCPwEBAQEBAQQBAQEBAQEBGQIGE?= =?us-ascii?q?oNOgguBVoQGgQ6CajkMghuCaIJjBYhbDIpBjzo9gjmFQogvhH2CeZBvjRA9iQU?= =?us-ascii?q?UBR+BFw8ngXAyGiNPMoF3CYIQKh+CESM3ijoBAQE?= X-IronPort-AV: E=Sophos;i="5.45,398,1508796000"; d="scan'208,217";a="248272050" Received: from mail-it0-f43.google.com ([209.85.214.43]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 13 Dec 2017 20:30:05 +0100 Received: by mail-it0-f43.google.com with SMTP id o130so21927089itg.0 for ; Wed, 13 Dec 2017 11:30:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=JBK/rHrxQynsErr4UIPNMOHwOFYzeiGsAUUKGyWqHdQ=; b=rknwqQSkeVJo2f/lXewML1C3eOukxycl3akQWJigZnFP4pTa2f52n5cAUoHTx+vlzP NRECTrBtlJOKKcsg7zMZedxCEhinVeJhIYAmTKTJzZUbcW/DEOf0tYZGpqKoOxECcHqx wsEzm+6UVb3EQ6tr6S4HQhdwvRMNksAx/8IB1T34VfKlu2UplJRFNFQ3haN2r5chq2ac mI2dWeCvIZcVYxq4b48wHpnpKI4Jnysrbxi9rKUHEHuNx5fnblY0SckLWiYcNfoRt8mT yv2ZckCd0pf6ouJ/ZfrGspjQY1GbWW1T6HpcD8tOkww9V1ooTeJi2Pt03iTuIWRewJP/ Ib+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=JBK/rHrxQynsErr4UIPNMOHwOFYzeiGsAUUKGyWqHdQ=; b=BxlC+5OLJaqJruuVBfmljcZ353iR2jb4HGNS1mECeic56iQxUKVznMxf5OXrTzuUyi 6JOg3i8ZV96OmcI/8JlBDMqTLRmeUe9NeWD+i1ry2mIE4IQtK1DnDrGE9vK98U100nJf zK+Xuwj641pkcEmWsuWLd0Wb0PftC4eHXVstrUB4DPN8iwl1eGeiJRsoMq1hqmjrKKqp Z8JZ+xW5cGZmHtL8CjKUlUj8aG0kjJfx8cRf1pmyCFmw+ZnTqdGJ86tWzn4MTYDMROA+ /uHEpOBX1pZiHNNPNSEd2bIfaZfZRMlZk/UO4pq7CfLKYs39GA1sym2jzizOKK8R+PSZ 5x6Q== X-Gm-Message-State: AKGB3mL7p/tcqV3pYYVDIFUtpMNSnYu0k85NH8RExv2KeD82BS1Qfrx4 GgaS+Vk2tbbb0CuoEEoI8UQ1yGfLmtgSFidgNQ== X-Google-Smtp-Source: ACJfBouraL+qXnukRaG357n/e2xu6in7w9k88K+ng/V2zdPAhGrXtgJU4avAF1LWQpfgeQiL8hjXEey62KMwgHXDVB4= X-Received: by 10.107.97.16 with SMTP id v16mr4045002iob.263.1513193403588; Wed, 13 Dec 2017 11:30:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.2.181.19 with HTTP; Wed, 13 Dec 2017 11:29:42 -0800 (PST) In-Reply-To: References: <6640cb32-fec3-e048-3f40-53d65bae5305@gerd-stolpmann.de> <20171211161024.kafvtxzq3qcoo46p@matica.foolinux.mooo.com> <131064f1-4d53-5fbc-8aa7-0f6210dcb7bd@irisa.fr> <20171213173926.GA13291@topoi.pooq.com> From: Yawar Amin Date: Wed, 13 Dec 2017 14:29:42 -0500 Message-ID: To: Robert Muller Cc: Hendrik Boom , Ocaml Mailing List Content-Type: multipart/alternative; boundary="089e0825a6584c245e05603dcb28" Subject: Re: [Caml-list] ReasonML concrete syntax --089e0825a6584c245e05603dcb28 Content-Type: text/plain; charset="UTF-8" Hi Bob, come hang out at the ReasonML Discord, you'll find that there's a lot of work ongoing to give the user better error messages as well as keep the benefits of auto-currying. I'm fairly sure they're thinking about ways to mitigate the problem of applying too few arguments (which I think affects OCaml too). On Wed, Dec 13, 2017 at 12:55 PM, Robert Muller wrote: > The case that I was trying to make to the ReasonML designers --- > unsuccessfully I guess --- is that the best way to lower the > barrier-to-entry for JS coders to ReasonML is to stick with the ML > tradition of writing k-ary functions with k-tuples and *simply not tell > them about currying at all* until they're up and running. As I understand > it, their parser unrolls the tuples > > let f = (x, y, z) => ... become let f = x => y => z => ... > > Then whenever an unsuspecting JS coder accidentally calls f with too few > arguments, f(a, b), they don't get an understandable type error because > f(a, b) is of function type and they get some weird error with arrows in it. > I hope they'll revisit this issue but it sounds like a done deal. > Bob > > > On Wed, Dec 13, 2017 at 12:39 PM, Hendrik Boom > wrote: > >> On Wed, Dec 13, 2017 at 09:22:05AM +0100, Sebastien Ferre wrote: >> > >> > The Scala notation is an interesting alternative, IMO. >> > >> > They have two notations, f(x,y) and f(x)(y), the latter being the >> > curryfied version allowing partial application. >> > >> > They also have a notation for partial application >> > of the non-curryfied form, f(x,_) and f(_,y), with >> > the advantage that not only the last argument can missing. >> >> I understand currying; I first encountered it in the 60's when >> studying combinatory logic. >> >> But I find it a nuisance in progrmming in OCaml, becuse it oftern >> happens by accident, and results in mysterious type errors, or none at >> all. >> >> That's why I'd like to see currying only happen explicitly; most of >> the time Ocaml figures I'm currying it's a mistake. >> >> -- hendrik >> >> -- >> 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 >> > > --089e0825a6584c245e05603dcb28 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hi Bob, come hang out at the ReasonML=C2=A0Discord, you= 9;ll find that there's a lot of work ongoing to give the user better er= ror messages as well as keep the benefits of auto-currying. I'm fairly = sure they're thinking about ways to mitigate the problem of applying to= o few arguments (which I think affects OCaml too).

On Wed, Dec 13, 2017 at 12:55 PM, Ro= bert Muller <robert.muller2@gmail.com> wrote:
The case that I was trying to m= ake to the ReasonML designers --- unsuccessfully I guess --- is that the be= st way to lower the barrier-to-entry for JS coders to ReasonML is to stick = with the ML tradition of writing k-ary functions with k-tuples and *simply = not tell them about currying at all* until they're up and running. As I= understand it, their parser unrolls the tuples

let f = =3D (x, y, z) =3D> ... become let f =3D x =3D> y =3D> z =3D> ..= .

Then whenever an unsuspecting JS coder accidenta= lly calls f with too few arguments, f(a, b), they don't get an understa= ndable type error because f(a, b) is of function type and they get some wei= rd error with arrows in it.
I hope they'll revisit this issue= but it sounds like a done deal.
Bob


On Wed, Dec 13, 2017 at 12:39 PM, Hendrik Boom <= hendrik@topoi.pooq.com> wrote:
On Wed, Dec 13, 2017 at 09:22:05AM +0100, Sebastien Ferre wrote:<= br> >
> The Scala notation is an interesting alternative, IMO.
>
> They have two notations, f(x,y) and f(x)(y), the latter being the
> curryfied version allowing partial application.
>
> They also have a notation for partial application
> of the non-curryfied form,=C2=A0 f(x,_) and f(_,y), with
> the advantage that not only the last argument can missing.

I understand currying; I first encountered it in the 60's when studying combinatory logic.

But I find it a nuisance in progrmming in OCaml, becuse it oftern
happens by accident, and results in mysterious type errors, or none at
all.

That's why I'd like to see currying only happen explicitly; most of=
the time Ocaml figures I'm currying it's a mistake.

-- hendrik

--
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/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs


--089e0825a6584c245e05603dcb28--