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 D0F347EF95 for ; Mon, 9 Mar 2015 14:16:27 +0100 (CET) X-IronPort-AV: E=Sophos;i="5.11,367,1422918000"; d="scan'208";a="125035074" Received: from vl21-pfc1.u-bourgogne.fr (HELO alcazar2) ([193.52.245.13]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 09 Mar 2015 14:16:25 +0100 Date: Mon, 9 Mar 2015 14:16:25 +0100 From: Maxence Guesdon To: caml-list@inria.fr Cc: Alain Frisch Message-ID: <20150309141625.0da29f2b@alcazar2> In-Reply-To: <54FD8397.2060002@lexifi.com> References: <54FD8397.2060002@lexifi.com> Organization: INRIA X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Changing precedence and placement of attributes On Mon, 09 Mar 2015 12:27:19 +0100 Alain Frisch wrote: > Dear caml-list, Hello, >=20 > Following a feature request by whitequark and a pull request by J=C3=A9r= =C3=A9mie=20 > Dimino, we're considering two related changes to attributes: >=20 > - Their precedence on type expressions, so that "int * int [@foo]" is=20 > parsed as "(int * int) [@foo]" instead of "int * (int [@foo])". >=20 > - Their placement on constructor/field declaration, so that one would=20 > write "A of int [@foo]" or "a : int [@foo]" instead of "A [@foo] of int"= =20 > or "a [@foo] : int". >=20 > References: >=20 > - http://caml.inria.fr/mantis/view.php?id=3D6612 > - https://github.com/ocaml/ocaml/pull/152 >=20 > There seems to be a strong support in favor of the change (at least,=20 > nobody objected to it on principle). But it can clearly break or change= =20 > the interpretation of existing code. I'm still in favor of doing the=20 > change as soon as possible. >=20 > So my question is: would anyone be negatively impacted (or just=20 > shocked) if the change was done as part of the next bug fix release=20 > (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