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 A045F82355 for ; Wed, 13 Dec 2017 18:55:37 +0100 (CET) Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=robert.muller2@gmail.com; spf=Pass smtp.mailfrom=robert.muller2@gmail.com; spf=None smtp.helo=postmaster@mail-oi0-f41.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of robert.muller2@gmail.com) identity=pra; client-ip=209.85.218.41; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="robert.muller2@gmail.com"; x-sender="robert.muller2@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of robert.muller2@gmail.com designates 209.85.218.41 as permitted sender) identity=mailfrom; client-ip=209.85.218.41; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="robert.muller2@gmail.com"; x-sender="robert.muller2@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-oi0-f41.google.com) identity=helo; client-ip=209.85.218.41; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="robert.muller2@gmail.com"; x-sender="postmaster@mail-oi0-f41.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AKJVTYRDES73eb2/juo+bUyQJP3N1i/DPJgcQr6Af?= =?us-ascii?q?oPdwSPT8p8bcNUDSrc9gkEXOFd2Cra4c0qyO6+jJYi8p2d65qncMcZhBBVcuqP?= =?us-ascii?q?49uEgeOvODElDxN/XwbiY3T4xoXV5h+GynYwAOQJ6tL1LdrWev4jEMBx7xKRR6?= =?us-ascii?q?JvjvGo7Vks+7y/2+94fcbglUmTaxe69+IAmr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=?us-ascii?q?Qw/DA4IJ6hFYDCAJiqh6XH1yC+SM54fGdDX2qLG3rya82hRvMIZTjadtVmmDEe?= =?us-ascii?q?Sf6kVosl2Av0nAD/wrtjaOHT/3tL5trYyNFp6riLxlkJ/jtuApHYjjiA?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0CZAADnaDFahinaVdFdGQEBAQEBAQEBA?= =?us-ascii?q?QEBAQcBAQEBAYMPgRV0JweDe4E2l3CBfYJjhwmHWIdiCiOFGAKFDAdDFAEBAQE?= =?us-ascii?q?BAQEBAQESAQEBCAsLCCgvgjgkgkcBAQEBAgEjHQEbEgsBAwELBgUEBw0NHQICI?= =?us-ascii?q?gERAQUBChIGExKJfQEDDQgQnA9AjBCCBQUBHIMLBYNeChknAwpZgj8BAQEBAQU?= =?us-ascii?q?BAQEBAQEBGQIGEoNOgguGaoMjDIIbgmiCYwWBLQGHLQyKQY91AoFhhhqNLIJ5k?= =?us-ascii?q?G+NEIlCFAUfgRcPJ4FwMhojTzJSgSUJghAqH4IRIzeKOgEBAQ?= X-IPAS-Result: =?us-ascii?q?A0CZAADnaDFahinaVdFdGQEBAQEBAQEBAQEBAQcBAQEBAYM?= =?us-ascii?q?PgRV0JweDe4E2l3CBfYJjhwmHWIdiCiOFGAKFDAdDFAEBAQEBAQEBAQESAQEBC?= =?us-ascii?q?AsLCCgvgjgkgkcBAQEBAgEjHQEbEgsBAwELBgUEBw0NHQICIgERAQUBChIGExK?= =?us-ascii?q?JfQEDDQgQnA9AjBCCBQUBHIMLBYNeChknAwpZgj8BAQEBAQUBAQEBAQEBGQIGE?= =?us-ascii?q?oNOgguGaoMjDIIbgmiCYwWBLQGHLQyKQY91AoFhhhqNLIJ5kG+NEIlCFAUfgRc?= =?us-ascii?q?PJ4FwMhojTzJSgSUJghAqH4IRIzeKOgEBAQ?= X-IronPort-AV: E=Sophos;i="5.45,397,1508796000"; d="scan'208,217";a="248265175" Received: from mail-oi0-f41.google.com ([209.85.218.41]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 13 Dec 2017 18:55:36 +0100 Received: by mail-oi0-f41.google.com with SMTP id t81so2122475oih.13 for ; Wed, 13 Dec 2017 09:55:36 -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=Lj75+FBQ52pdrPxtHfo7nV+F2k3BlGyflq5z78+InY0=; b=RjE9WEPoNlKKqhsk3t/5A1WMkyaZzI/y2OuMVx3Xy5mOH4au3qRiz8SutKN3jzXyXH GVn44Pv8GQkj5YRttyWRp1+Z8UOl4MKclmVFPTsY0RJQ423K9jFceYXcviMeOfI6m+iY XHZhLght0EaQNJ/PJ0qa+I8EDSu3UAKhYkefVS+GCqpofTwQBtW+HBE8LkfS9D+9kiR+ YIb3Hy1wEXlYqohMa94haXzgnjefw+ND8bikeOu6SzgJRfuL+ZNx2778mjKTTRqPSxgT foVAAGpbeCY8JApJ0KlIFzE5wvPcqvinWbmX7DsJos13rQJOumP1vSMGZL8Yea0wugmk 0cjA== 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=Lj75+FBQ52pdrPxtHfo7nV+F2k3BlGyflq5z78+InY0=; b=K2n65tzWJ2nEDjhrE1GGW5n6fkc7QVqqL0V8+1jm8uXACOSzq/xVV7cY/IxVoWoSB+ 0K42oAX9ukXoxUPpaU5Ponr+tIKteTCLkNEwy6RIaOEZWXUd3oBvgImTvIWqvTj1xkXE ZWwKq9WQmTq3NAkI7q7c1bmoB1yoyRgBuMMkBeT/1Jcv6RVzwl3rDMjJ3C4sv1AHWDCn Oc8ncRl/W5cbj9QAuvT4i2OfRFBqA8io+5sjBUgNFq8R8GSx9TJqf5rnecjXHVIuHYKn C9RHkYlCNxujrTKDzy+NmdE0xQK+naoHofDhW6ugYIwVCIAomiGYmdPtZxfGOKbVf3Ru OFaQ== X-Gm-Message-State: AKGB3mKZaODUqqcI3V/cNd9WrAI1xugwcStYCLsrN4D2ciIgmbJ9zOIM AqldiK8HWWFkUiWgKncz1Wb9FS6xaZ7mzKvyTsg= X-Google-Smtp-Source: ACJfBouSw9xgmmbSu3EvgX/ZLPjc7fsBHSU/g74JOsB+Y7S2AqjgABRvcGIiBlxs8MZrYq374qbsq54X017kNtQb5zI= X-Received: by 10.202.199.131 with SMTP id x125mr2369752oif.270.1513187734783; Wed, 13 Dec 2017 09:55:34 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.171.201 with HTTP; Wed, 13 Dec 2017 09:55:34 -0800 (PST) In-Reply-To: <20171213173926.GA13291@topoi.pooq.com> 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: Robert Muller Date: Wed, 13 Dec 2017 12:55:34 -0500 Message-ID: To: Hendrik Boom Cc: Ocaml Mailing List Content-Type: multipart/alternative; boundary="001a1134f9b0690c6b05603c7911" Subject: Re: [Caml-list] ReasonML concrete syntax --001a1134f9b0690c6b05603c7911 Content-Type: text/plain; charset="UTF-8" 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 > --001a1134f9b0690c6b05603c7911 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The case that I was trying to make to the ReasonML designe= rs --- 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 wr= iting k-ary functions with k-tuples and *simply not tell them about curryin= g at all* until they're up and running. As I understand it, their parse= r unrolls the tuples

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

Th= en whenever an unsuspecting JS coder accidentally calls f with too few argu= ments, 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 de= al.
Bob


=
On Wed, Dec 13, 2017 at 12:39 PM, Hendrik Boom <= span dir=3D"ltr"><hendrik@topoi.pooq.com> wrote:
On Wed, Dec 13, 2017 at 09:22:05AM +0100, Sebast= ien 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/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--001a1134f9b0690c6b05603c7911--