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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 6AE387EE25 for ; Fri, 25 Oct 2013 22:32:17 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of yminsky@janestreet.com) identity=pra; client-ip=38.105.200.229; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="yminsky@janestreet.com"; x-sender="yminsky@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.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=mail3-smtp-sop.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 (mail3-smtp-sop.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=mail3-smtp-sop.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: AtMBAGPUalImacjlnGdsb2JhbABZgz9Uq2mSX4EbHg4BAQEBAQYWCTyCJQEBBScZAQEsCwEPCwsNDSEiEgEFAQoSBhMSh2MDDwMCCJp+iw2EUwEFhGQDiW8Gj1MHhCyYDYEvjmwYKYRt X-IPAS-Result: AtMBAGPUalImacjlnGdsb2JhbABZgz9Uq2mSX4EbHg4BAQEBAQYWCTyCJQEBBScZAQEsCwEPCwsNDSEiEgEFAQoSBhMSh2MDDwMCCJp+iw2EUwEFhGQDiW8Gj1MHhCyYDYEvjmwYKYRt X-IronPort-AV: E=Sophos;i="4.93,572,1378850400"; d="scan'208";a="31915505" Received: from mx5.janestreet.com (HELO tot-dmz-mxout1.janestreet.com) ([38.105.200.229]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 25 Oct 2013 22:32:16 +0200 Received: from tot-oib-smtp1.delacy.com ([172.27.22.15] helo=tot-smtp) by tot-dmz-mxout1.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1VZo3J-0000sh-Eh for caml-list@inria.fr; Fri, 25 Oct 2013 16:32:13 -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 1VZo3J-0002ym-DB for caml-list@inria.fr; Fri, 25 Oct 2013 16:32:13 -0400 Received: from mail-ea0-f181.google.com ([209.85.215.181]) by mxgoog2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1VZo3J-0003Fu-8R for caml-list@inria.fr; Fri, 25 Oct 2013 16:32:13 -0400 Received: by mail-ea0-f181.google.com with SMTP id d10so959091eaj.12 for ; Fri, 25 Oct 2013 13:32:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Msb42LRqBUGdBGq/cPv1zeO8ioKUzBDVRbQiWF7KMrk=; b=EcQ2SEcm8XePpvvnA9Uib+J6vn9Enke+ACyE/JDkzFqPuJXunft3FlJU0X9zKYa0A2 9C120QoSC7BrnNquiVCMnqimaDEeKp+jpAyvWfrvzSNYl9RE+iF/LhFmAawbxjas9ymV u2XLywcNQAexwqu0hfy4j9luQDkzmjJvME3hI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Msb42LRqBUGdBGq/cPv1zeO8ioKUzBDVRbQiWF7KMrk=; b=RdJnHCOfcrgbEcx1lgBjIceHTeMFI9IQcaSXiAHrGUdov+zn7mw0bJ7oawjoam80BQ b8AGkovJ2MBlE310qHxJcqUlDy1y1odGPE1HUN0fZnoS3yBFS2BPlN+BIJ3EDk6GCaDV qAZHxCIQkPtDynURhrsYxoWBavNdcXR80wftyYsGfxeEViy3NSOeHcuAPvK2BzjqV5XR 7W8ouJDjy9tZ0uOZTa8FMTiM2IPxe6kgzsciXNJMOKh5YosjOCTjW9cSttK0wApyxKl7 w8bmbRv4Zu4gu/9cMAeSs4S/d/R33SIjZomBnUzPtMnu05z2n57plZL+HdaiomuDcseU Mljg== X-Gm-Message-State: ALoCoQmqcwlHBsFBGdhvUv0H2el0zdcG1ASxq1UIWlxXMDOFj8CIiLKXiixqCa4OKF7pLvi9BnIPYp2oTfEqI/DXbarEmPVZxg4ocpplq8BAIS9W26x2esX4l+b+tlZmBadGpAijEVqB2W7JjCj558iU/qYR8Diahw== X-Received: by 10.15.61.66 with SMTP id h42mr9736496eex.62.1382733132757; Fri, 25 Oct 2013 13:32:12 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.15.61.66 with SMTP id h42mr9736483eex.62.1382733132670; Fri, 25 Oct 2013 13:32:12 -0700 (PDT) Received: by 10.223.180.138 with HTTP; Fri, 25 Oct 2013 13:32:12 -0700 (PDT) In-Reply-To: <526A7F33.6040203@mpi-sws.org> References: <97627FCD-30E1-45AD-A72B-CD423170C0AC@math.nagoya-u.ac.jp> <20131025082911.GB23798@voyager> <878uxhd62p.fsf@golf.niidar.ru> <526A7F33.6040203@mpi-sws.org> Date: Fri, 25 Oct 2013 16:32:12 -0400 Message-ID: From: Yaron Minsky To: Andreas Rossberg Cc: Gabriel Scherer , Ivan Gotovchits , Roberto Di Cosmo , Jacques Garrigue , OCaML List Mailing Content-Type: text/plain; charset=ISO-8859-1 Subject: Re: [Caml-list] Equality between abstract type definitions Changing the semantics of this will, I think, break a _lot_ of code. I for one am not excited to do so. For what it's worth, I suspect that most people who are surprised by this are people who were trained on Standard ML. At Jane Street we've had a lot of people learn the language, and the complaints I've heard about this feature are, I think, mostly from that group. I also don't find Andreas suggestion particularly intuitive. I would have guessed that (x: '_a) would constrain x to be a weakly polymorphic value, which is at odds with the proposal. y On Fri, Oct 25, 2013 at 10:24 AM, Andreas Rossberg wrote: > On 10/25/2013 01:09 PM, Gabriel Scherer wrote: >> >> However, I think that the current syntax of implicitly-introduced >> variables with heuristically-defined scoping rules is bad in any case. >> My own toy experiment with explicit syntaxes always use an explicit >> binding syntax for both rigid and flexible variables (eg. "forall a b c >> in ..." and "some a b c in ..."). In this regard, the ('a 'b . ty) or >> (type a) syntaxes are definite improvements -- if only we had applied >> those explicit binding forms to GADT constructor types as well... So I >> think that even with Andreas' proposed change, people would still be >> surprised by things like the following: >> >> let id : 'a -> 'a = fun x -> x >> >> let dup (x : 'a) ('a * 'a) = >> let result = (x, x) in >> (id : 'a -> 'a) result (* fails, while (id : 'b -> 'b) works *) > > > Yes, I agree that implicit scoping is a bit of an ugly hack. That said, I > don't expect anybody to be truly surprised about the example above. At least > I never heard this being an issue for SML programmers. People probably > hardly ever write anything like the above, or avoid shadowing for clarity > anyway. > > /Andreas > > > > -- > 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