caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Yawar Amin <yawar.amin@gmail.com>
To: Robert Muller <robert.muller2@gmail.com>
Cc: Hendrik Boom <hendrik@topoi.pooq.com>,
	Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] ReasonML concrete syntax
Date: Wed, 13 Dec 2017 14:29:42 -0500	[thread overview]
Message-ID: <CAJbYVJ+CBBpVFBKJJHFifKE5vLVG5qtFjwZ8zQ7juGL3Gv+i+g@mail.gmail.com> (raw)
In-Reply-To: <CAKmYinkJbiVbGi6jD=oWRdkFWBTnaErg+qPt6iWn_rag3mDrHA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2328 bytes --]

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 <robert.muller2@gmail.com>
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 <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,  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
>>
>
>

[-- Attachment #2: Type: text/html, Size: 3630 bytes --]

  parent reply	other threads:[~2017-12-13 19:30 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-10 18:12 Robert Muller
2017-12-11  0:09 ` Yawar Amin
2017-12-11  5:50   ` Viet Le
2017-12-11  6:45     ` Ian Zimmerman
2017-12-11  6:53       ` Sven SAULEAU
2017-12-11  6:50     ` Sven SAULEAU
2017-12-11  6:54       ` Evgeny Khramtsov
2017-12-11  7:22         ` =?gb18030?B?Qm9i?=
2017-12-11  7:16           ` Evgeny Khramtsov
2017-12-17 15:02         ` Paolo Donadeo
2017-12-17 16:01           ` Guillaume Huysmans
2017-12-17 16:55             ` Paolo Donadeo
2017-12-17 20:13               ` Ian Zimmerman
2017-12-17 20:49                 ` Robert Muller
2017-12-18  1:34                   ` Yawar Amin
2017-12-18 16:36                     ` Evgeny Khramtsov
2017-12-18 17:00                       ` Jesper Louis Andersen
2017-12-18 17:27                         ` Gary Trakhman
2017-12-18 17:53                         ` Evgeny Khramtsov
2017-12-18  2:14                   ` Yawar Amin
2017-12-11 15:51       ` Yawar Amin
2017-12-11 16:07         ` Sven SAULEAU
2017-12-11 17:11         ` David Brown
2017-12-12  3:49         ` Louis Roché
2017-12-12  4:18           ` Yawar Amin
2017-12-12  5:52           ` Oliver Bandel
2017-12-11 14:40 ` Gerd Stolpmann
2017-12-11 16:10   ` Ian Zimmerman
2017-12-11 16:47     ` Viet Le
2017-12-11 17:10       ` Yotam Barnoy
2017-12-11 18:56         ` Robert Muller
2017-12-11 19:23           ` Yawar Amin
2017-12-11 21:10         ` Marshall
2017-12-11 17:29       ` Yawar Amin
2017-12-11 17:59       ` Ian Zimmerman
2017-12-11 18:30     ` Gerd Stolpmann
2017-12-13  8:22       ` Sebastien Ferre
2017-12-13  9:26         ` Evgeny Khramtsov
2017-12-13 10:37           ` David Allsopp
2017-12-13 16:38             ` Marshall
2017-12-13 16:44               ` Yawar Amin
2017-12-13 17:20                 ` David Allsopp
2017-12-13 17:51                   ` Yawar Amin
2017-12-13 17:39         ` Hendrik Boom
2017-12-13 17:55           ` Robert Muller
2017-12-13 18:19             ` Viet Le
2017-12-13 19:29             ` Yawar Amin [this message]
2017-12-13  8:55 ` Nicolas Boulay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJbYVJ+CBBpVFBKJJHFifKE5vLVG5qtFjwZ8zQ7juGL3Gv+i+g@mail.gmail.com \
    --to=yawar.amin@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=hendrik@topoi.pooq.com \
    --cc=robert.muller2@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).