From: Maxence Guesdon <Maxence.Guesdon@inria.fr>
To: caml-list@inria.fr
Cc: Alain Frisch <alain.frisch@lexifi.com>
Subject: Re: [Caml-list] Changing precedence and placement of attributes
Date: Mon, 9 Mar 2015 14:16:25 +0100 [thread overview]
Message-ID: <20150309141625.0da29f2b@alcazar2> (raw)
In-Reply-To: <54FD8397.2060002@lexifi.com>
On Mon, 09 Mar 2015 12:27:19 +0100
Alain Frisch <alain.frisch@lexifi.com> wrote:
> Dear caml-list,
Hello,
>
> Following a feature request by whitequark and a pull request by Jérémie
> Dimino, we're considering two related changes to attributes:
>
> - Their precedence on type expressions, so that "int * int [@foo]" is
> parsed as "(int * int) [@foo]" instead of "int * (int [@foo])".
>
> - Their placement on constructor/field declaration, so that one would
> write "A of int [@foo]" or "a : int [@foo]" instead of "A [@foo] of int"
> or "a [@foo] : int".
>
> References:
>
> - http://caml.inria.fr/mantis/view.php?id=6612
> - https://github.com/ocaml/ocaml/pull/152
>
> There seems to be a strong support in favor of the change (at least,
> nobody objected to it on principle). But it can clearly break or change
> the interpretation of existing code. I'm still in favor of doing the
> change as soon as possible.
>
> So my question is: would anyone be negatively impacted (or just
> shocked) if the change was done as part of the next bug fix release
> (4.02.2)?
I'm quite "shocked" as it becomes inconsistent with other precedences
in type definitions. By now
int * int list
is parsed as
int * (int list)
and not as
(int * int) list
I would expect attributes to be associated the same way.
How would be parsed the following:
int * int [@foo] * int
?
- m
next prev parent reply other threads:[~2015-03-09 13:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-09 11:27 Alain Frisch
2015-03-09 13:16 ` Maxence Guesdon [this message]
2015-03-09 13:37 ` Alain Frisch
2015-03-09 13:57 ` Maxence Guesdon
2015-03-09 14:27 ` Leo White
2015-03-09 16:22 ` Ben Millwood
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=20150309141625.0da29f2b@alcazar2 \
--to=maxence.guesdon@inria.fr \
--cc=alain.frisch@lexifi.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