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 A686E7EEFA for ; Tue, 10 Nov 2015 01:11:17 +0100 (CET) IronPort-PHdr: 9a23:zMZbpBETgPLapVXWndQDup1GYnF86YWxBRYc798ds5kLTJ75pMWwAkXT6L1XgUPTWs2DsrQf27eQ7/yrAzRIyK3CmU5BWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYsExnyfTB4Ov7yUtaLyZ/niqbup9aJO01hv3mUX/BbFF2OtwLft80b08NJC50a7V/3mEZOYPlc3mhyJFiezF7W78a0+4N/oWwL46pyv50IbaKvdK09SflcDS86G2Ez/szi8xfZHiWV4X5JcmgQngBJAEDv6xb/FsPxvy32rOt+8DWdJcr3C6gzXi3k5KBuHky7wBwbPiI0pTmEwvd7i7hW9Uqs Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=hendrik@topoi.pooq.com; spf=None smtp.mailfrom=hendrik@topoi.pooq.com; spf=None smtp.helo=postmaster@april.topoi.pooq.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=pra; client-ip=69.165.131.134; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of hendrik@topoi.pooq.com) identity=mailfrom; client-ip=69.165.131.134; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="hendrik@topoi.pooq.com"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@april.topoi.pooq.com) identity=helo; client-ip=69.165.131.134; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="hendrik@topoi.pooq.com"; x-sender="postmaster@april.topoi.pooq.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0ABEAAINUFW/4aDpUVehFglhCi6JYFjhhACgXsSAQEBAQEBAQGBCYIugggBAQQ6TwsYCSUPBRhEiC7BfwEBCAIBIItShSeCfYEVBY4RiDeNHwhdfpZ4g3InATuEIiA0hS4BAQE X-IPAS-Result: A0ABEAAINUFW/4aDpUVehFglhCi6JYFjhhACgXsSAQEBAQEBAQGBCYIugggBAQQ6TwsYCSUPBRhEiC7BfwEBCAIBIItShSeCfYEVBY4RiDeNHwhdfpZ4g3InATuEIiA0hS4BAQE X-IronPort-AV: E=Sophos;i="5.20,267,1444687200"; d="scan'208";a="186835937" Received: from topoi.pooq.com (HELO april.topoi.pooq.com) ([69.165.131.134]) by mail2-smtp-roc.national.inria.fr with ESMTP; 10 Nov 2015 01:11:13 +0100 Received: by april.topoi.pooq.com (Postfix, from userid 1001) id 347991A06A8; Mon, 9 Nov 2015 19:11:08 -0500 (EST) Date: Mon, 9 Nov 2015 19:11:08 -0500 From: Hendrik Boom To: caml-list@inria.fr Message-ID: <20151110001108.GB30456@topoi.pooq.com> References: <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E070@IRSMSX102.ger.corp.intel.com> <87pozk6vjp.fsf@mid.deneb.enyo.de> <0F7D3B1B3C4B894D824F5B822E3E5A172CE3E747@IRSMSX102.ger.corp.intel.com> <56407297.2060309@frisch.fr> <564076EA.7020805@mpi-sws.org> <5640D8E0.6060102@lexifi.com> <5640E2EF.7070400@mpi-sws.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: [Caml-list] Newbie comment on constructor syntax On Mon, Nov 09, 2015 at 10:11:30PM +0100, Gabriel Scherer wrote: > On Mon, Nov 9, 2015 at 7:16 PM, Andreas Rossberg wrote: > > Hm, I see your point, but don't you already introduce that problem (i.e., > > commit to tuples) by allowing the `C x` sugar for n-ary constructors? > > Because in a world of curried constructors, `x` would not be typed as the > > tuple of arguments, but only as the first argument of the constructor. > > Yes, it is already problematic, and in fact I'm personally not > completely convinced by this feature -- Alain it "reduces bad > surprises for beginners", but I suspect that adding more magic in this > place could not actually help that much -- at least the current > semantic model is simple. If you're looking for a beginner mode that eliminates most surprises, the easiest change is to require more explicit type annotations. Foe example, one could require the types of function parameters to be explicitly specified. I find thta this policy makes my code substantially clearer, both to me and to the compiler. --hendrik