caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Allsopp <dra-news@metastack.com>
To: Evgeny Khramtsov <xramtsov@gmail.com>,
	"caml-list@inria.fr" <caml-list@inria.fr>
Subject: RE: [Caml-list] ReasonML concrete syntax
Date: Wed, 13 Dec 2017 10:37:20 +0000	[thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D9018994EA0C@Remus.metastack.local> (raw)
In-Reply-To: <20171213122648.298e7edd@zinid.ru>

Evgeny Khramtsov wrote:
> Wed, 13 Dec 2017 09:22:05 +0100
> Sebastien Ferre <Sebastien.Ferre@irisa.fr> wrote:
> 
> > They have two notations, f(x,y) and f(x)(y), the latter being the
> > curryfied version allowing partial application.
> 
> This is too complex for JavaScript developers.

Speaking as (I think) OCaml's only Windows-by-preference core developer, a sometime viola player[1], a countertenor[2], a sometime "expert" Visual Basic developer, one who has written quite a lot of ML and quite a lot of non-trivial JavaScript, and probably holder of many other oft-insulted categories, may I observe that in the archives of these threads, it's rare that the ones hurling the insults paint the greatest pictures of either their arguments or themselves...

One of the many differences between the Standard ML basis library and OCaml's stdlib which I find interesting is that SML typically eschews currying unless it's clearly beneficial, preferring signatures like 'a * 'b -> 'c unless 'a -> 'b -> 'c is clearly useful. Standard ML also has stricter rules on the parentheses for tuples, of course.

In terms of why you might want to be "hiding" currying, or at least making it need less immediate explanation when learning the language, consider, for example, explaining the difference between:

let f x y = print_int x; print_int y in
f 42

and

let f x = print_int x; print_int in
f 42

(I'm guessing with its web-based heritage that Reason programming involves a few side-effects)

From my limited experience of teaching beginners to ML - both those who have programmed and those who haven't - I'd say that currying is probably one of the concepts requiring the most explanation; certainly much more than call-by-value vs lazy, or even immutable values. I can certainly see why the Reason team are doing so much to try to make it seem more familiar.


David


[1] https://en.wikipedia.org/wiki/Viola_jokes
[2] http://myweb.tiscali.co.uk/stnicolaschurch/mus-altos.html

  reply	other threads:[~2017-12-13 10:37 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 [this message]
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
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=E51C5B015DBD1348A1D85763337FB6D9018994EA0C@Remus.metastack.local \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    --cc=xramtsov@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).