caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Diego Olivier Fernandez Pons <dofp.ocaml@gmail.com>
To: Wojciech Meyer <wojciech.meyer@googlemail.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] "Let"-less syntax for coreML
Date: Tue, 3 Jan 2012 23:18:40 +0100	[thread overview]
Message-ID: <CAHqiZ-Je6-fkdvinEqZ5aLXf7jQpuZ6C6ac-G9gK0TpZK8hjag@mail.gmail.com> (raw)
In-Reply-To: <wf4nwc38it.fsf@gmail.com>

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

    Wojciech,


> - ambiguity with structure equivalence operator

- replacement of == would not be good as it is reserved for
> physical equality


Pointer equality is not coreML (not in SML, nor F#). Easy to fix anyway.

- ambiguity in the parser, e.g. the toplevel let bindings are separated
>  by "let", the local lets by pair "let" and "in"
>

I thought about this one... that's the interesting point of forcing a
single name on the left of the '=' sign

     f = fun x y -> x + y

you can deduce this meant LET f = fun x y -> x + y and therefore know where
the previous instruction ends because the two constructions are isomorphic.

Say

    let g = fun x -> x + 1 in let f = fun x -> let v = g 0 in x + v

becomes

   g = fun x -> x + 1 f = fun x -> v = g 0 in x + v

with a unique semantic

  g = fun x -> x + 1
  f = fun x ->
        v = g 0
     in x + v

You only need "in" for the return value of the function, all other elements
being separated by an implicit ";"

Notice that "fun" is also useless, the arrow alone shows it is a
function  g = x -> x + 1 but that feels a bit extreme.

- ignoring "rec" - no good too - please see the other thread, it
>  contradicts how the aliasing of values is now used e.g. for extending
>  modules via. include
>

Easy to fix as well.

        Diego Olivier

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

  reply	other threads:[~2012-01-03 22:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-03 18:43 Diego Olivier Fernandez Pons
2012-01-03 19:09 ` Alan Schmitt
2012-01-03 19:12 ` Wojciech Meyer
2012-01-03 22:18   ` Diego Olivier Fernandez Pons [this message]
2012-01-03 22:34 ` Gabriel Scherer
2012-01-04 10:05   ` Diego Olivier Fernandez Pons
2012-01-04 10:57     ` Pierre-Alexandre Voye
2012-01-04 11:08       ` Andrej Bauer
2012-01-04 11:06     ` Daniel Bünzli
2012-01-04 12:18       ` Yaron Minsky
2012-01-04 13:30         ` Diego Olivier Fernandez Pons
2012-01-04 15:50           ` Edgar Friendly
2012-01-04 17:12           ` Damien Doligez
2012-01-04 16:59         ` Markus Mottl

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=CAHqiZ-Je6-fkdvinEqZ5aLXf7jQpuZ6C6ac-G9gK0TpZK8hjag@mail.gmail.com \
    --to=dofp.ocaml@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=wojciech.meyer@googlemail.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).