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 6B6BF82355 for ; Wed, 13 Dec 2017 09:55:08 +0100 (CET) Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=nicolas.boulay@gmail.com; spf=Pass smtp.mailfrom=nicolas.boulay@gmail.com; spf=None smtp.helo=postmaster@mail-wr0-f178.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of nicolas.boulay@gmail.com) identity=pra; client-ip=209.85.128.178; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nicolas.boulay@gmail.com"; x-sender="nicolas.boulay@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of nicolas.boulay@gmail.com designates 209.85.128.178 as permitted sender) identity=mailfrom; client-ip=209.85.128.178; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nicolas.boulay@gmail.com"; x-sender="nicolas.boulay@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-wr0-f178.google.com) identity=helo; client-ip=209.85.128.178; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="nicolas.boulay@gmail.com"; x-sender="postmaster@mail-wr0-f178.google.com"; x-conformance=sidf_compatible IronPort-PHdr: =?us-ascii?q?9a23=3AuZHNXBLG2UWNUvXUadmcpTZWNBhigK39O0sv0rFi?= =?us-ascii?q?tYgeK/rxwZ3uMQTl6Ol3ixeRBMOHs6sC07KempujcFRI2YyGvnEGfc4EfD4+ou?= =?us-ascii?q?JSoTYdBtWYA1bwNv/gYn9yNs1DUFh44yPzahANS47xaFLIv3K98yMZFAnhOgpp?= =?us-ascii?q?POT1HZPZg9iq2+yo9JDffxhEiCChbb9uMR67sRjfus4KjIV4N60/0AHJonxGe+?= =?us-ascii?q?RXwWNnO1eelAvi68mz4ZBu7T1et+ou+MBcX6r6eb84TaFDAzQ9L281/szrugLd?= =?us-ascii?q?QgaJ+3ART38ZkhtMAwjC8RH6QpL8uTb0u+ZhxCWXO9D9QKsqUjq+8ahkVB7oiD?= =?us-ascii?q?8GNzEn9mHXltdwh79frB64uhBz35LYbISTOfFjfK3SYMkaSHJDUcZfVyJPDICy?= =?us-ascii?q?YZYRAeUdJutXtZXxqkEUoBeiGQWhBuXiwSJIiH/s2q061vwsHxnH3AM8GNIOtG?= =?us-ascii?q?7brM7oP6oPVuC10a3Iwi/DbvhL3jr97onIfQwmofGIR71watHcxlIoFwPYilWf?= =?us-ascii?q?s4zkMymT1usXtmiU8fNtWOSygGAprAFxpyKgxsYqioTRmI0VzlXE+Tx9wIkvI9?= =?us-ascii?q?24R1R3Ydm+EJtfsSyRKoh4Qts6Tm12pCo3zqcKtJ27cSQQ1Zgr2R3SZ+aaf4WK?= =?us-ascii?q?4R/uUvuaLy1ii3J/Yr2/gg6/8Ui+xe34Ucm5yFNKoTBEktnIr3wM2QbT5tSeRv?= =?us-ascii?q?tz40us2zWC2xrc6uFDJkA0mq7bJIA7zrEskZoTtFzPHi7wmErokK+bblso9vSs?= =?us-ascii?q?5uj9YbjrpoWQO5Jqhgz9KKgih86yDOcgPggLRWeb+OC81LP5/U3+RbVHlvs2kq?= =?us-ascii?q?jFv5DdIcQUvLW5DxVO3YYk9ha/Cy2p0dQDkHkIKVJKYhOHj4zzN17SJ/D4CO+z?= =?us-ascii?q?g06wnzdz2/DGIrrhD43RIXfZlbfhea9x60pdyAoo0dBS/IlUC7EEIPLrQED9rt?= =?us-ascii?q?3YDhkjMwy12enrEtt91plNEV6IV5WeOq7IrRet++YrLvPEMJUSsjvnN74g+vrq?= =?us-ascii?q?gGVjsVAYdKitm5AQbSbrMO5hJhC/YHHrht4aWU0Now43XaS+jlyJVjpafF64WL?= =?us-ascii?q?847yB9DoujANGQFciWnLWd0XLjTdVtbWdcBwXJSC+weg=3D=3D?= X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: =?us-ascii?q?A0D9AQDb6TBahrKAVdFdHQEBBQELAYQkd?= =?us-ascii?q?CcHg3uBNpdygX2IeJA4G4ooB0MUAQEBAQEBAQEBARIBAQEICwsIKC+COCQBgkc?= =?us-ascii?q?BBAEjBBkBOAEDAQsBBQMCBAc3AgIhARIBBQEcBhMUiXwDDQiKSZEcQIwQgW06g?= =?us-ascii?q?wsFhAYnDYMYAQsBHQIGEoNRgguGaoJqRYUDgmMFimOXeS8Oh3uILoR9c5J0jRA?= =?us-ascii?q?9iQUUBR+BFzaBcDIaCDA6MgaBcQlvgUuCE0A3ikMBAQE?= X-IPAS-Result: =?us-ascii?q?A0D9AQDb6TBahrKAVdFdHQEBBQELAYQkdCcHg3uBNpdygX2?= =?us-ascii?q?IeJA4G4ooB0MUAQEBAQEBAQEBARIBAQEICwsIKC+COCQBgkcBBAEjBBkBOAEDA?= =?us-ascii?q?QsBBQMCBAc3AgIhARIBBQEcBhMUiXwDDQiKSZEcQIwQgW06gwsFhAYnDYMYAQs?= =?us-ascii?q?BHQIGEoNRgguGaoJqRYUDgmMFimOXeS8Oh3uILoR9c5J0jRA9iQUUBR+BFzaBc?= =?us-ascii?q?DIaCDA6MgaBcQlvgUuCE0A3ikMBAQE?= X-IronPort-AV: E=Sophos;i="5.45,397,1508796000"; d="scan'208,217";a="305256424" Received: from mail-wr0-f178.google.com ([209.85.128.178]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 13 Dec 2017 09:55:07 +0100 Received: by mail-wr0-f178.google.com with SMTP id v22so1406218wrb.0 for ; Wed, 13 Dec 2017 00:55:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=Mi1y4+T95gEFLYh4Xs5ZKtS5SB3soE3b3VUeZnjfYoU=; b=AJgNZ2nPSga7o6hnDiWkz88Vv7oYz7bL3K56wGQl7pnvKEt9mMJtXIjI0ZO5q8eTEx P3k//3V7ABzLD8Na8Oc5AFphgjzqH2HSV8mNZ4Gau6PE9vKITSJA6yN+8cM4wR/5gnS/ esSU4pA5QRJv5r6rRwocDC1wKbyRQt/eVz33fKZ+35zhfTPbDLjhABstKbM5nzbMaNee oN/bYtwd0XWTqJxo98LRyaRk8LG2ZX9MIaP1F99Ky2XHvm1k9WeuE6XyKRmazDKeT8Zu B4Gz0f7k6kOjGorPWfTCrcGCmgeyF2ddkhSIisSJNq/ctMy3QAlXUVuA4LT2kb+gEZA4 lV1Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=Mi1y4+T95gEFLYh4Xs5ZKtS5SB3soE3b3VUeZnjfYoU=; b=JMHQnh4cPHePmdMu5sHW6SiaZlqhqDp8giHIABGmiGhvfNu/5qQ9+c1IjVv/SDPmO9 rxUEFQmoMxh0rH2dOaeBRbRWnpZGA0SstP/azMxfA2VAW34JIPn1/WkXB5Ad/sbzO7Aw VLPAWpexH5j7X0EZQ1f3kkOzehDvDoK8qORZCSC2D/VqrknRE85rJIkz2Eg2ssxKBL1z lUpQl30YjyN7QdJI12ZPxYOeFSjt92TYInmcjCzUTwUzjx2GX3hqGPaV7MN5q8KYBfG6 UpOSnrJBEErspzfome8vVkWynmHehvZs7EPyrkYvuqb5qJiwX72jL6XQC03vhxGtvjUU /bIQ== X-Gm-Message-State: AKGB3mIM5ByEPNW7fSaYVhcAyiQHm07uOkJin9nU3NxZ1tSFGOtPiTen u0Kox1ud1fYKpBNRhjjp6CsyAR6O2IS8s/IQAzaBj0yl X-Google-Smtp-Source: ACJfBotvyiaWQUYhHlCKvMPA7EGmFFYQdZrSb8Jogg3nV03i0d/V2EJKQJW02I63QrSY/lM5Iop5iSilXIhE8S7+oTw= X-Received: by 10.223.165.67 with SMTP id j3mr1665430wrb.181.1513155307358; Wed, 13 Dec 2017 00:55:07 -0800 (PST) MIME-Version: 1.0 Sender: nicolas.boulay@gmail.com Received: by 10.223.139.153 with HTTP; Wed, 13 Dec 2017 00:55:06 -0800 (PST) In-Reply-To: References: From: Nicolas Boulay Date: Wed, 13 Dec 2017 09:55:06 +0100 X-Google-Sender-Auth: uAKY5uBLyt9WatnjT9oAW5wr5Tw Message-ID: To: Robert Muller Cc: Ocaml Mailing List Content-Type: multipart/alternative; boundary="f403045f12be95cdb5056034ec45" X-Validation-by: nicolas@boulay.name Subject: Re: [Caml-list] ReasonML concrete syntax --f403045f12be95cdb5056034ec45 Content-Type: text/plain; charset="UTF-8" Have you look at ELM ? That's a functional language for the web that enforce the last best practice of JavaScript web development. For me, it miss only a true module system. http://elm-lang.org/ 2017-12-10 19:12 GMT+01:00 Robert Muller : > The team developing ReasonML seems to be experimenting with concrete > syntax in an effort to make it feel as familiar and natural as possible to > JavaScript programmers. Seems like a good idea. But the present version > seems to hardwire parentheses awkwardly for function definitions and calls. > Parentheses are required for both function definitions and calls. So one > writes > > let incr(n) = n + 1 and incr(5) > > but not > > let incr n = n + 1 or incr 5 > > Fair enough, but for multi-argument functions the parser seems to unroll > the parenthesized items (both parameters & arguments) to leave curried > functions. E.g., > > let add(m, n) = m + n or equivalently let add = (m, n) => m + n > > then add(5, 3) is 8 as one would expect. But the (m, n) in let add(m, n) = > ... isn't a pattern matching a pair, it's the JS-style sequence of input > parameters and the definition unrolls to let add = (m) => (n) => ... . So > add(5) : int -> int and all three of add(5, 3), add(5)(3) and { let add5 = > add(5); add5(3) } are 8. There's probably a way to write an add function > of type int * int -> int, but I don't know how to write it. > > I'm wondering what the OCaml community makes of this. I find it awkward. > Bob Muller > > > --f403045f12be95cdb5056034ec45 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Have you look at ELM ? That's a functional language fo= r the web that enforce the last best practice of JavaScript web development= . For me, it miss only a true module system.

http://elm-lang.org/

=
2017-12-10 19:12 GMT+01:00 Robert Muller <robert.muller2@gmail.com>:
The team developing ReasonML seems to be experimenting w= ith concrete syntax in an effort to make it feel as familiar and natural as= possible to JavaScript programmers. Seems like a good idea. But the presen= t version seems to hardwire parentheses awkwardly for function definitions = and calls. Parentheses are required for both function definitions and calls= . So one writes

let incr(n) =3D n + 1=C2=A0 =C2=A0 = =C2=A0 =C2=A0and=C2=A0 =C2=A0incr(5)

but not
=

let incr n =3D n + 1=C2=A0 =C2=A0 =C2=A0 =C2=A0 or=C2= =A0 =C2=A0 incr 5

Fair enough, but for multi-argum= ent functions the parser seems to unroll the parenthesized items (both para= meters & arguments) to leave curried functions. E.g.,

let add(m, n) =3D m + n=C2=A0 or equivalently let add =3D (m, n) = =3D> m + n

then add(5, 3) is 8 as one would exp= ect. But the (m, n) in let add(m, n) =3D ... isn't a pattern matching a= pair, it's the JS-style sequence of input parameters and the definitio= n unrolls to let add =3D (m) =3D> (n) =3D> ... . So add(5) : int ->= ; int and all three of add(5, 3), add(5)(3) and { let add5 =3D add(5);=C2= =A0 add5(3) } are 8. There's probably a way to write an add function of= type int * int -> int, but I don't know how to write it.

I'm wondering what the OCaml community makes of th= is. I find it awkward.
Bob Muller



--f403045f12be95cdb5056034ec45--