From: Chet Murthy <murthy.chet@gmail.com>
To: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] a question about syntax
Date: Wed, 14 Feb 2018 17:17:46 -0800 [thread overview]
Message-ID: <CA++P_gfEfJQBTObLppGEtxUdWGOvBU3-ifD7zGNqT7qBosRgDw@mail.gmail.com> (raw)
In-Reply-To: <20180214234023.36qmqoukx47zk442@matica.foolinux.mooo.com>
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
i don't remember the answer to your question, but I suspect it is this:
# 1,2 ;;
- : int * int = (1, 2)
That is, again, syntactic succinctness. tuples need not always be
parenthesized. But I'm really just making this up -- I certainly don't
remember well enough to be definitive on this.
It does seem to follow the general pattern, though: with generativity of
record-field-names as another example.
On Wed, Feb 14, 2018 at 3:40 PM, Ian Zimmerman <itz@very.loosely.org> wrote:
> On 2018-02-14 15:02, Chet Murthy wrote:
>
> > I remember back in the day Pierre Weis explaining to me that this
> > syntactic trade-off was made in order to allow that "let" and "match"
> > didn't have ending key-words (e.g. "end").
>
> I would understand and accept that choice. But the larger question is,
> why was the semicolon overloaded like this? In SML the semicolon serves
> just one purpose: separating consecutive imperative statements (well it
> can also separate declarations but that is optional). Why has CAML
> chosen to use the semicolon in list and record patterns and values,
> instead of the comma like SML?
>
> > Unlike in SML/NJ.
>
> SML has multiple implementations (as implied in the S).
>
[-- Attachment #2: Type: text/html, Size: 1780 bytes --]
prev parent reply other threads:[~2018-02-15 1:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-14 3:31 Tim Leonard
2018-02-14 3:41 ` Kenneth Adam Miller
2018-02-14 4:12 ` Yawar Amin
2018-02-14 4:32 ` Tim Leonard
2018-02-14 18:50 ` Oliver Bandel
2018-02-14 23:02 ` Chet Murthy
2018-02-14 23:40 ` Ian Zimmerman
2018-02-15 0:17 ` Evgeny Roubinchtein
2018-02-15 1:17 ` Chet Murthy [this message]
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=CA++P_gfEfJQBTObLppGEtxUdWGOvBU3-ifD7zGNqT7qBosRgDw@mail.gmail.com \
--to=murthy.chet@gmail.com \
--cc=caml-list@inria.fr \
/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).