220 39904 <4df1f86f-cdee-5275-bdd1-b53f2f10bef8@wanadoo.fr> article
Path: news.gmane.org!.POSTED!not-for-mail
From: "Vicente J. Botet Escriba" <vicente.botet@wanadoo.fr>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Named Parameters for C++
Date: Sat, 18 Aug 2018 17:09:34 +0200
Lines: 71
Approved: news@gmane.org
Message-ID: <4df1f86f-cdee-5275-bdd1-b53f2f10bef8@wanadoo.fr>
References: <CAPuuy5eBx1ybcPjS6dNsk7n1_c2uhdRBS19qr=q5cj3cTURnLQ@mail.gmail.com>
 <1708615.QdClGnisbJ@tjmaciei-mobl1>
 <60fba045-252b-486e-92e0-03c08b6d5a35@wanadoo.fr>
 <1925737.EHUJpxQoH7@tjmaciei-mobl1>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset="UTF-8"; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Trace: blaine.gmane.org 1534604855 16983 195.159.176.226 (18 Aug 2018 15:07:35 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Sat, 18 Aug 2018 15:07:35 +0000 (UTC)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0)
 Gecko/20100101 Thunderbird/52.9.1
To: std-proposals@isocpp.org, Thiago Macieira <thiago@macieira.org>
Original-X-From: std-proposals+bncBDH67CONY4PBBM7N4DNQKGQEQCIJS4Q@isocpp.org Sat Aug 18 17:07:31 2018
Return-path: <std-proposals+bncBDH67CONY4PBBM7N4DNQKGQEQCIJS4Q@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-wm0-f71.google.com ([74.125.82.71])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDH67CONY4PBBM7N4DNQKGQEQCIJS4Q@isocpp.org>)
	id 1fr2p8-0004Ii-US
	for gclcip-std-proposals@m.gmane.org; Sat, 18 Aug 2018 17:07:31 +0200
Original-Received: by mail-wm0-f71.google.com with SMTP id y18-v6sf6838966wma.9
        for <gclcip-std-proposals@m.gmane.org>; Sat, 18 Aug 2018 08:09:41 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1534604980; cv=pass;
        d=google.com; s=arc-20160816;
        b=x3CV/vcesYjCNymNENtszGC+TGMW6knBb0v15ZL8uGivVtWS6Zik3QjExaQnLMdkT0
         OdbVN+omEwvGqX/9LobBffbI0u3hpRdSh/xp/UXkOK5kMF0EPrUid+ULJAxNmtJlgPbc
         VtcamayW2ll6bSWxrfI9mdrjkFkLiDbrYg86pZ5mwFCN9tugjiZ1oueNZaUu+p3KDKg6
         siBUA+h7lQCgz2Wj/s0P4xCi6z62BkjnYtpo8gEuc9hwDAicYrjHb6j0RYqvi2Zg4oou
         C0Dclf1vzu+Q08OMNys5uDYp6WaUM2lG1959LQWUDvZeMvCeRPCeuTmViU2tObv6fCs+
         Uipg==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post
         :list-id:mailing-list:precedence:reply-to:content-language
         :content-transfer-encoding:in-reply-to:mime-version:user-agent:date
         :message-id:from:references:to:subject:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=qTc52Z2+F1s/i5wjK+n1wfh0jFhAnc57XSG6hefmnuI=;
        b=vuuuj0wrrfrRv+RvAeqB30ezUtliOjUz8FXsEKX0DILgq8L+WCtsUPUWKFN7vQijM/
         OU4jPBWfiy1nuH2VCXRVyktRJn0aPPgHDtuIyU4NIf5Jd1eDflW37PwlljF/S9t5h0/K
         DlEcRVbBebDXPqcYr3cixg32WIjR5Bv571Aoevy51me5mMgr5XYx0zcxJRc3hRVOqcf8
         Fci7YiH96wEGKWb65vdHxGR/eRUGCPFl8c42nqX1UZJdGTxjYEwrignd7KtcQbIEqeDo
         sLtqyn0jWVMu0v3dsq3lcIgyDWD3JDZQjfYZLeoPXtai1Wx53+k5PIlwlqB2gs 
ARC-Authentication-Results: i=2; mx.google.com;
       spf=neutral (google.com: 80.12.242.125 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=subject:to:references:from:message-id:date:user-agent:mime-version
         :in-reply-to:content-transfer-encoding:content-language
         :x-original-sender:x-original-authentication-results:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=qTc52Z2+F1s/i5wjK+n1wfh0jFhAnc57XSG6hefmnuI=;
        b=ZL7SEVDpTFmvzu5tVrXTESMBX9w4TIp0CQC1iQNSo+WLSVNs3Kj/Ft4chrTpe5hnWc
         iCi1tWMQCCZgNNv9M0HAOhT8Ol06xD3yyWr1lDut3PpVbiOLR9Fcm6ysoLKSZIvED56X
         zCrsihvJWQdMrY386/+c56MAO3HeCjWEvMmfrCfJbYtTIh7iHxytdSxOO5re7/kXorq2
         ITBQoUndXjW9mgmpL+ZVMy/nF/VlJ8dkxsW0GzDQM47rGVISSIGeF6TDhuzZLqTLhSWK
         lI/HSI6YkjyvqEnGOlu2GzBnGpGEyG5i+ixEWwlPKg+OwiQSO2FAoZCxapPoVAGJBcrD
         3rE 
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:subject:to:references:from:message-id:date
         :user-agent:mime-version:in-reply-to:content-transfer-encoding
         :content-language:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=qTc52Z2+F1s/i5wjK+n1wfh0jFhAnc57XSG6hefmnuI=;
        b=njwSW+SqC3IL7X26CxHw/TXZRYP0qv145ww7u9Bi31xm4h414brbbbvJ/z2CyLqfah
         chz20IaR9lVgSho1HJfW4eQgftjz/x2jVGIwfjrGr2LL6kCmKjOeMETCUqjYYsvWst8M
         90+XPKYhUsa+WkurURJFg4UL2WhtOixeN7dV/EUlpL+FkOIDKgLyka3V5qGZz3eZF3SQ
         OxbSJlf50a+l7O+sXOeuiqNriOTJt76lO+o7ZxHQ4bvP/3orIHqsIXLOb5FLfsGhurHE
         AY+bKsmSJZKDPAy72vv5R+/5XAqiPhoSu4zSmuOHvl2 
X-Gm-Message-State: AOUpUlFBEAdWfDMVsJbSNBW5Kjn+6jOKFpGnNFlMVF+AzkwVyJL0KlrN
	ird2pEDmESdax22DHQ6KUG0=
X-Google-Smtp-Source: AA+uWPx/06E4CZWuD8m3UqNuHHYBQU0arE0fo9+m4Hl6XbLt+4jq+gzz4/MbegEgHcbv63KcTwgD3w==
X-Received: by 2002:adf:df8c:: with SMTP id z12-v6mr3426519wrl.2.1534604980299;
        Sat, 18 Aug 2018 08:09:40 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:adf:fd49:: with SMTP id h9-v6ls2988450wrs.12.gmail; Sat, 18
 Aug 2018 08:09:38 -0700 (PDT)
X-Received: by 2002:a5d:4643:: with SMTP id j3-v6mr24671002wrs.52.1534604978968;
        Sat, 18 Aug 2018 08:09:38 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1534604978; cv=none;
        d=google.com; s=arc-20160816;
        b=lPrivWvx11Xs2+UPTc8UrG3YeGhDpg0EeTAvDp2XyP192FVrX4IDaC4z9vosflt8Z9
         d/pCipHWsPZ0uKAPN3SZepD9VgM2J7ccS/RLnZzcImBf5MLDtgHgywdplKS+kBDG6Qe8
         ZCWIrdtLIhmB2W1TwH8NzfiQ7OeS/cqxUkN13Yjf/0Kac9CYWwddJx0ahoEspz5349E6
         E2Bkf3FO+W2leazoRVtmpYCea29KVcztZISRDxatupO38hTxItwkG8j5cAdaMUA/A023
         yFphnAtOR5MGyJ+QXqessoO6Y+R6Fjwf4Z7g+IXB0U4RbNMp2gTo/V5mwLmb8bh5aqNl
         G70Q==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=content-language:content-transfer-encoding:in-reply-to:mime-version
         :user-agent:date:message-id:from:references:to:subject
         :arc-authentication-results;
        bh=sjTIt6XjCzCJ/l8RVWCKbB6iV/IeklF/8X/NrDcQrW8=;
        b=WH8L5qn8yzamN7xRxCCRbbuXpkr1TqUiTYI8xeRsxiHhMXKs1FB/GMZ1f1RtU5/0gd
         bjyZ8p1v+HwWQdq1/IeJTDx3KuMXWYaX3Qd3hzaF9e6/hU0qowIytqkzUpKV2B1hJ/I4
         pKKuzq21JjEVKg6LxnDS7gV1SZLnXTksKAe6249AztxwPbjZvnHdOWaePbJ7lVPTjTGU
         PvYPoNMMeVcwOIsDodRqdMPKVdyPSe0FuXEfDEeDp7A9/ZfUS20tAbYhXCqSR/YDNZO+
         Mt8RiF6F2R1YVgXbsfgb0vnfAiGrHq9d0ifP0YKHFkdy0XWQSYxq/J1rMM9xw545RK4Q
         kjRA==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 80.12.242.125 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
Original-Received: from smtp.smtpout.orange.fr (smtp03.smtpout.orange.fr. [80.12.242.125])
        by mx.google.com with ESMTPS id g129-v6si4744647wmg.58.2018.08.18.08.09.38
        for <std-proposals@isocpp.org>
        (version=TLS1 cipher=AES128-SHA bits=128/128);
        Sat, 18 Aug 2018 08:09:38 -0700 (PDT)
Received-SPF: neutral (google.com: 80.12.242.125 is neither permitted nor denied by best guess record for domain of vicente.botet@wanadoo.fr) client-ip=80.12.242.125;
Original-Received: from imac-de-vicente-botet-escriba.home ([86.253.39.2])
	by mwinf5d50 with ME
	id Qf9c1y00E02nUfq03f9dBc; Sat, 18 Aug 2018 17:09:38 +0200
X-ME-Helo: imac-de-vicente-botet-escriba.home
X-ME-Auth: dmljZW50ZS5ib3RldEB3YW5hZG9vLmZy
X-ME-Date: Sat, 18 Aug 2018 17:09:38 +0200
X-ME-IP: 86.253.39.2
In-Reply-To: <1925737.EHUJpxQoH7@tjmaciei-mobl1>
Content-Language: en-US
X-Original-Sender: vicente.botet@wanadoo.fr
X-Original-Authentication-Results: mx.google.com;       spf=neutral
 (google.com: 80.12.242.125 is neither permitted nor denied by best guess
 record for domain of vicente.botet@wanadoo.fr) smtp.mailfrom=vicente.botet@wanadoo.fr
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: std-proposals@isocpp.org
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:39904
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/39904>

Le 17/08/2018 =C3=A0 17:05, Thiago Macieira a =C3=A9crit=C2=A0:
> On Friday, 17 August 2018 07:46:42 PDT Vicente J. Botet Escriba wrote:
>> As this would request to compiler to store somewhere all the
>> declarations of a specific function, I believe that in order to don't
>> pay for what we don't use, we would need to opt in for the feature is
>> some specific way, that I don't worry about. E.g.
>>
>>       void f(a:int, b:int);
>>
>>       void f(x:int x, y:int);
>>
>> Only in this case the named parameters should be allowed.
> Agreed. To me, parameter names need to be opt-in. Anything else is simply=
 not
> workable as the names have not and will continue not to be stable, so the=
y
> aren't usable by users in the first place.
>
> But my question to you is: are those two function declarations the same
> function? If they are, how do you propose we declare them so that they ar=
e
> *not* the same function?
Yes, they declare the same function.

If we wan to have two different overload, we would need something else,=20
that don't need to be a named parameter. We could use now just tag types

struct tag1 {}

struct tag2 {}


      void f(tag1, a:int, b:int);

      void f(tag2, x:int, y:int);

Now we can call f using the tag objects

	f(tag1{}, a:=3D1, b:=3D2);
	f(tag2{}, x:=3D1, y:=3D2);


and we could add any syntactic sugar that make it easier to define those ta=
gs, and make them even local to the function

      void f(@tag1, a:int, b:int);

      void f(@tag2, x:int, y:int);


Now we can call f using the local tags

	f(@tag1, a:=3D1, b:=3D2);
	f(@tag2, x:=3D1, y:=3D2);

Note that tagx is not associated to any named parameter.


Vicente


--=20
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp=
..org/d/msgid/std-proposals/4df1f86f-cdee-5275-bdd1-b53f2f10bef8%40wanadoo.f=
r.

.
