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 D37817F30A for ; Mon, 11 Mar 2013 19:52:27 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yminsky@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yminsky@janestreet.com designates 38.105.200.229 as permitted sender) identity=mailfrom; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@tot-dmz-mxout1.janestreet.com) identity=helo; client-ip=38.105.200.229; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="postmaster@tot-dmz-mxout1.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkYBAAQnPlEmacjlmWdsb2JhbABDsl2SBoFXHg4BAQEBAQgLCwcUKIIpAQEEAUABASwLAQQLCwsNDSEiEgEFAQoSBhMSh28DCQYDCaBoinKEOwEFhRIDiV8Gjw4Hg0CWWIEehFyJGRYphEk X-IPAS-Result: AkYBAAQnPlEmacjlmWdsb2JhbABDsl2SBoFXHg4BAQEBAQgLCwcUKIIpAQEEAUABASwLAQQLCwsNDSEiEgEFAQoSBhMSh28DCQYDCaBoinKEOwEFhRIDiV8Gjw4Hg0CWWIEehFyJGRYphEk X-IronPort-AV: E=Sophos;i="4.84,825,1355094000"; d="scan'208";a="6519517" Received: from mx5.janestreet.com (HELO tot-dmz-mxout1.janestreet.com) ([38.105.200.229]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 11 Mar 2013 19:52:27 +0100 Received: from [172.27.22.15] (helo=tot-smtp) by tot-dmz-mxout1.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1UF7pj-0007or-Ju for caml-list@inria.fr; Mon, 11 Mar 2013 14:52:27 -0400 Received: from tot-dmz-mxgoog1.delacy.com ([172.27.224.14] helo=mxgoog2.janestreet.com) by tot-smtp with esmtps (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UF7pi-0006UI-2H for caml-list@inria.fr; Mon, 11 Mar 2013 14:52:26 -0400 Received: from mail-lb0-f199.google.com ([209.85.217.199]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1UF7ph-0004Fp-TX for caml-list@inria.fr; Mon, 11 Mar 2013 14:52:26 -0400 Received: by mail-lb0-f199.google.com with SMTP id m4so6633361lbo.10 for ; Mon, 11 Mar 2013 11:52:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=x-received:mime-version:x-received:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=wYWbA6XcX4O0X2oYoI6Cx/J04Z6DgPCdMF2QFz5MQb0=; b=SsHdzfb6ZJm1P/w0TS80shSMyDvvsl8fWYQpEP0Wz61MH/f/o8Fpc/m5LjMvV8jJSw efCISqXd6tNr8fSCUoPCg73HNymWIqY9rXEr70S69gIWl2WnfAYkwBcvqIOps2sMPr/B ArBIx9i34rbzne4dAfY1LZjytDjdK22xec+Jc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:x-received:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=wYWbA6XcX4O0X2oYoI6Cx/J04Z6DgPCdMF2QFz5MQb0=; b=DKknOfcF44mksoi8kTYu3GpsdhYD18B+1TJlRgryB2/cOhcznW6iGcOJweuzdzkgTN AEUOfJ9N3IV/1mfY8huOJnqcB4/sNqZ2PAwz0N4GXzzUJ7kVefCbs1B/UF6EIAcWWYC0 g+o1hBjWRkrzjPPQB/5cCT86A2Qd78q7Hxjjn+wFojsr64jlPyi4UWon4T1xnUlgDa7n Hpe4r19VKRMMxbOEXPjGHXKNhAng0wGp5I/+L6h/tT5h7YLxHCHfA2oyKWQ3Hkt4996F 8Qz0ONrH/vFcrRF/NZ4BFCx+a6ogL8OfsEFM9jLAfOz2zMDxUF7B6YOxnY6CU0n3rLSm B9Pg== X-Received: by 10.15.23.193 with SMTP id h41mr39382770eeu.17.1363027945047; Mon, 11 Mar 2013 11:52:25 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.15.23.193 with SMTP id h41mr39382753eeu.17.1363027944944; Mon, 11 Mar 2013 11:52:24 -0700 (PDT) Received: by 10.223.4.140 with HTTP; Mon, 11 Mar 2013 11:52:24 -0700 (PDT) In-Reply-To: <513DC595.9020006@frisch.fr> References: <513DC595.9020006@frisch.fr> Date: Mon, 11 Mar 2013 14:52:24 -0400 Message-ID: From: Yaron Minsky To: Alain Frisch Cc: yminsky@gmail.com, caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQmiaUmmur+tbR3Un7lcJeBnM8+8zfTyitjO666GoF/b9rHdrJ9+FFunFlDq9HqDy+i/dkaH4CAtwMWBRcs94TZ4ZZDWP/zp6227J0zvXqEcLy7jaB9hOYcJ4cEtchRI5JMhxUesghPrYp/oOH6ArPJf3Q+1Hw== Subject: Re: [Caml-list] Record field disambiguation in 4.01 On Mon, Mar 11, 2013 at 7:52 AM, Alain Frisch wrote: > On 03/10/2013 12:39 AM, Yaron Minsky wrote: >> >> Also, I'm wondering if anyone has thoughts as to how much code this >> change will break? The answer might be "quite a lot", and it might >> nonetheless be worth it. But I'm curious what people's thoughts are. > > > As Jacques said, this is only a warning, which is turned off by default. I > expect that all the "unused stuff" warnings also broke most code bases > around which are compiled with "-w +A -warn-error A". I'm sure you are not > suggesting that new warnings should never be triggered on code which used to > be well-typed by a previous version of the compiler... That is entirely sensible. I normally run with all warnings on, minus a handful of explicit ones I don't want. That normally works well (since most new errors are in fact helpful!) > The warning tells you something useful: with that record type declaration, > the reference to field "y" becomes ambiguous, which means in particular that > (i) your code might become fragile w.r.t. reordering of type declarations, > (ii) the code might become harder to read (the reader might expect that > field "y" is typically related to a different record type in your code > base). Of course, a more explicit warning message, as you suggest, would be > even better. Agreed. > During the discussion on type-based disambiguation, Mark Shinwell commented > that most record types in JS code base are defined in nested modules (and > often exposed only through builder functions) to avoid label clashes. Is > your example an instance where this is not the case? It is. If I'd turned the warning off, would it have in fact picked the more recent definition? y > > Alain > > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs