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 DCFED82355 for ; Wed, 13 Dec 2017 19:20:04 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=vietlq85@gmail.com; spf=Pass smtp.mailfrom=vietlq85@gmail.com; spf=None smtp.helo=postmaster@mail-qt0-f171.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of vietlq85@gmail.com) identity=pra; client-ip=209.85.216.171; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="vietlq85@gmail.com"; x-sender="vietlq85@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of vietlq85@gmail.com designates 209.85.216.171 as permitted sender) identity=mailfrom; client-ip=209.85.216.171; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="vietlq85@gmail.com"; x-sender="vietlq85@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-qt0-f171.google.com) identity=helo; client-ip=209.85.216.171; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="vietlq85@gmail.com"; x-sender="postmaster@mail-qt0-f171.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AeSAvLByDm+gA9L3XCy+O+j09IxM/srCxBDY+r6Qd?= =?us-ascii?q?2+kVIJqq85mqBkHD//Il1AaPAd2Craocw8Pt8InYEVQa5piAtH1QOLdtbDQizf?= =?us-ascii?q?ssogo7HcSeAlf6JvO5JwYzHcBFSUM3tyrjaRsdF8nxfUDdrWOv5jAOBBr/KRB1?= =?us-ascii?q?JuPoEYLOksi7ze+/94HObwlSmDaxfa55IQmrownWqsQYm5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us-ascii?q?8grhU2QNa4DIrfQpn93ZSO2S66GttdYWUQWQPEKmvha4jRA6REUymVOMI012Fd?= =?us-ascii?q?WA=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0C2AAAZbzFahqvYVdFdGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYMPgRV0FBOEAoE2l3CBfYJjhg2FUIpmCiOFGAKFE0MUAQEBAQE?= =?us-ascii?q?BAQEBARIBAQEICwsIKC+COCSCRwEBAQECASMdARsSCwEDAQsGBQsNDR0CAiEBA?= =?us-ascii?q?REBBQEKEgYTEol9AQMNCBCcBECMEIIFBQEcgwsFg14KGScDCllNgXIBAQEBAQU?= =?us-ascii?q?BAQEBAQEBARgCBhKDToILhVyBDoJqOQyCG4JogmMFgS0BAYcsDJBriRAzCAEBg?= =?us-ascii?q?WEKhhCIL4R9gnmQb40QPYkFFCSBFw8ngXBvTzJSgSUJgjofgXNBN4o6AQEB?= X-IPAS-Result: =?us-ascii?q?A0C2AAAZbzFahqvYVdFdGQEBAQEBAQEBAQEBAQcBAQEBAYM?= =?us-ascii?q?PgRV0FBOEAoE2l3CBfYJjhg2FUIpmCiOFGAKFE0MUAQEBAQEBAQEBARIBAQEIC?= =?us-ascii?q?wsIKC+COCSCRwEBAQECASMdARsSCwEDAQsGBQsNDR0CAiEBAREBBQEKEgYTEol?= =?us-ascii?q?9AQMNCBCcBECMEIIFBQEcgwsFg14KGScDCllNgXIBAQEBAQUBAQEBAQEBARgCB?= =?us-ascii?q?hKDToILhVyBDoJqOQyCG4JogmMFgS0BAYcsDJBriRAzCAEBgWEKhhCIL4R9gnm?= =?us-ascii?q?Qb40QPYkFFCSBFw8ngXBvTzJSgSUJgjofgXNBN4o6AQEB?= X-IronPort-AV: E=Sophos;i="5.45,397,1508796000"; d="scan'208,217";a="305354023" Received: from mail-qt0-f171.google.com ([209.85.216.171]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 13 Dec 2017 19:20:03 +0100 Received: by mail-qt0-f171.google.com with SMTP id f2so4852838qtj.4 for ; Wed, 13 Dec 2017 10:20:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=tyjn+QCi+whC7cAiKmtmcoEcOklOjAwosEaLpsV6fQQ=; b=sGiZBYDVJDCVlCQzijw/9rlPwbzyWMnpub4LvgHQmm1VDD+oL152Q14hJVN5MYdoHu szYcNiZu67kxmYJq2G+aV5zC0ZkjoxP9WE4MsnK4HkHbEj7MgbVYS3/Y6iXSfaJavxRl fBkf0gs8Hgjhc7ejwNIETgh/ULjc1u9FN0FGHlzZIA8h1onV0wbNu+cegGeMNah1QCG0 q//diUezk+kAKWxxu+X8heDyJ4ckow799EG5yKmEE1x+4+GuE3lCQMpBf2e8YqfUt1Lf uHHCgeN3pkLRP/rF1k3TpcG+P19ugiIWHctp/6cnlNVlqlyC10MXLpVQwTb+eYg3ORx5 Xpfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=tyjn+QCi+whC7cAiKmtmcoEcOklOjAwosEaLpsV6fQQ=; b=q7HG3VmjxZ12aLZ9vBcs5EUs4etaajLkz7BMWogBwvpz1iYNbjcya8tV23pzXez8qC kIniWOS+OTp5wkdB9C25kQ92s4jf8z1scKy2yIdW3PsbJb+QGj+xzZDmxGTfy/IMu1FJ usSuZkAZ5gpLxSfNBDI8zAa68hbSKRztrJjrKhgcociHzEiDhlt2loUDKQJjhH1xZo+d /mbU1ZUPR9npPsE4u9iBYdSxFBL1cLrXR9lMO56zJ0weuPZE+oGTsUmg+oelnVuDDVQW e2QRBkUiDzPLU4kERD4J4tMQRPpBntH8qaWN5ku5EYVSFarYmiQt3KqfbR3i1ZdhyUvh 8xoQ== X-Gm-Message-State: AKGB3mLW7NjcFK263gyggmGfeQWI2Pa8TBhQLfc3LjDQ299mTjsggZCK 21PrJrZb3YoTzir/zcOUoMxKCudRRA36c98Gvxnxfw== X-Google-Smtp-Source: ACJfBouQrchE1viYNfzDjnffX30YKfOwH4WHsp85El1ePkCR3FTTkluH1JFcvVKdDbGQxgPQGx6k/6qdcQaGuO7eyHQ= X-Received: by 10.200.37.3 with SMTP id 3mr11533166qtm.21.1513189202220; Wed, 13 Dec 2017 10:20:02 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: From: Viet Le Date: Wed, 13 Dec 2017 18:19:50 +0000 Message-ID: To: Robert Muller Cc: Hendrik Boom , Ocaml Mailing List Content-Type: multipart/alternative; boundary="001a1140333ee05a7005603cd094" Subject: Re: [Caml-list] ReasonML concrete syntax --001a1140333ee05a7005603cd094 Content-Type: text/plain; charset="UTF-8" Great point, Robert. Sounds like wasted effort for me. Maybe they should undo this one. Other deviations were fine though. Viet. On Wed, 13 Dec 2017 at 17:56, 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 >> > > -- Kind regards, Viet --001a1140333ee05a7005603cd094 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Great point, Robert. Sounds like wasted effort for me. Ma= ybe they should undo this one. Other deviations were fine though.

Viet.

=

On Wed, 13 Dec 2017 at 17:56= , Robert Muller <robert.mull= er2@gmail.com> wrote:
T= he case that I was trying to make to the ReasonML designers --- unsuccessfu= lly I guess --- is that the best way to lower the barrier-to-entry for JS c= oders to ReasonML is to stick with the ML tradition of writing k-ary functi= ons with k-tuples and *simply not tell them about currying at all* until th= ey're up and running. As I understand it, their parser unrolls the tupl= es

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

Then whenever an u= nsuspecting 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 funct= ion 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.
Bo= b


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

--
Kind re= gards,
Viet
--001a1140333ee05a7005603cd094--