From: Wojciech Meyer <wojciech.meyer@googlemail.com>
To: Diego Olivier Fernandez Pons <dofp.ocaml@gmail.com>
Cc: caml-list <caml-list@inria.fr>
Subject: Re: [Caml-list] "Let"-less syntax for coreML
Date: Tue, 03 Jan 2012 19:12:26 +0000 [thread overview]
Message-ID: <wf4nwc38it.fsf@gmail.com> (raw)
In-Reply-To: <CAHqiZ-L3_qx4sWUrxw57usJkguCb2wuBtRx6d_Gz9aucV_bsqw@mail.gmail.com> (Diego Olivier Fernandez Pons's message of "Tue, 3 Jan 2012 19:43:49 +0100")
Hi,
Diego Olivier Fernandez Pons <dofp.ocaml@gmail.com> writes:
> List,
>
>
> I was wondering if there was any obstruction to the removal of the
> "let" keyword in a syntax for coreML.
>
> My reasoning is that because everytime there is a "let" there is also
> an "=" sign, we could completely remove the "let" and use the "=" sign
> instead to identify new symbol introductions.
>
> x = 1
> s = function x -> x + 1
> d = s 1
> o = function f g -> function x -> f (g x)
>
> The only cases to handle would be
> - comparison "=" sign : replaced by "=="
> - let rec : could be ignored or replaced by something else like "=|"
> - equational style 'let f x y = x + y' : forbid
>
> Does anyone see anything that could prevent this from being done ?
The problem here is that it would cause:
- ambiguity with structure equivalence operator
- ambiguity in the parser, e.g. the toplevel let bindings are separated
by "let", the local lets by pair "let" and "in"
- replacement of == would not be good as it is reserved for physical
equality
- 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
--
Wojciech
next prev parent reply other threads:[~2012-01-03 19:12 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 [this message]
2012-01-03 22:18 ` Diego Olivier Fernandez Pons
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=wf4nwc38it.fsf@gmail.com \
--to=wojciech.meyer@googlemail.com \
--cc=caml-list@inria.fr \
--cc=dofp.ocaml@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