220 39867 <CAC+0CCP6nzxYMpKXcCMCvi-6wq0XRGs6PZquBQ9Q4t1q_re3AA@mail.gmail.com> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Jake Arkinstall <jake.arkinstall@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Named Parameters for C++
Date: Fri, 17 Aug 2018 17:17:56 +0100
Lines: 82
Approved: news@gmane.org
Message-ID: <CAC+0CCP6nzxYMpKXcCMCvi-6wq0XRGs6PZquBQ9Q4t1q_re3AA@mail.gmail.com>
References: <CAPuuy5eBx1ybcPjS6dNsk7n1_c2uhdRBS19qr=q5cj3cTURnLQ@mail.gmail.com>
 <pl3ogk$csr$1@blaine.gmane.org> <f3af9e48-f865-476e-8724-4af19ce23369@isocpp.org>
 <pl671k$gsb$1@blaine.gmane.org> <823c098a-0fb0-18c3-82f3-e8a8616312f1@gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="0000000000009ceb970573a3e7d3"
X-Trace: blaine.gmane.org 1534522562 21821 195.159.176.226 (17 Aug 2018 16:16:02 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 17 Aug 2018 16:16:02 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDCZX3WUUQFRBP7K3PNQKGQECSLAFSI@isocpp.org Fri Aug 17 18:15:58 2018
Return-path: <std-proposals+bncBDCZX3WUUQFRBP7K3PNQKGQECSLAFSI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f70.google.com ([209.85.214.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDCZX3WUUQFRBP7K3PNQKGQECSLAFSI@isocpp.org>)
	id 1fqhPq-0005Ws-H9
	for gclcip-std-proposals@m.gmane.org; Fri, 17 Aug 2018 18:15:58 +0200
Original-Received: by mail-it0-f70.google.com with SMTP id b124-v6sf7548315itb.9
        for <gclcip-std-proposals@m.gmane.org>; Fri, 17 Aug 2018 09:18:08 -0700 (PDT)
ARC-Seal: i=2; a=rsa-sha256; t=1534522688; cv=pass;
        d=google.com; s=arc-20160816;
        b=uj60svLPX41//x3DBo/rzHrJotRO2keN9+A8vZ6XpV3j9weTHn8MqUBW/2yC6YyQ3S
         qXw8cM5/lTM/biXJLq5zLklu+yi6FbRcXwTkQCvWspKiDhsfOfmW0/MYiC3VjJolAYx+
         Z51/Sb5dxUTSEPJBlZZdKoTHgRLxJ74U+NJwV8zC7Jjfv45w2L6ua9vH/MsFfAk+51vZ
         O97UnxNgSvpFKQG8UABXFdFLWgqJuMYtnEg84zyBlwSposWyQf9aa8L9Vyhh9O1lZ/HM
         p+L758nAtjfdbSL76VDjtWkW8EQZPxB1hPPCV5Ovx+dLm63FnmF189kBAfHZYwPY/EqW
         uTog==
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:to:subject:message-id:date
         :from:in-reply-to:references:mime-version:arc-authentication-results
         :arc-message-signature:dkim-signature:arc-authentication-results;
        bh=tdnYYaZWzj+ypKfBFzPb8IijkrwuXPsDqBUbGa98Q8U=;
        b=B+LuHAupfm9/WyakZigKuQAx27Su5WvKhEO2esUeUOHcn54j7GhvSWRUa+vLunsEQ7
         SxpIaqIh5Lxi93ANWDWV8US6FNtzM5nFYmgVIaf5Mz6/lRzrMpbki1FA+oMa0o9eHvBd
         LAp7Xj644f0bURAQMioV1grddnF3Xsz/2oP2KCaUyQ9KbmWZzsSQeHCiB6t9ZKPP79eC
         xzloFxZpZABlhcrFgshexzNKiRDYTzjX1CK98QysJwMKGXsCdLaP5hBoIAFH5NdNBNYB
         90FVev33SUf1rS39lK5Q2U6gxMgHp6T6qXqYhAXvOcXL+WyssKwmc4n9S3GZu9abvWu5
         jOFg==
ARC-Authentication-Results: i=2; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=WVgXwhk3;
       spf=pass (google.com: domain of jake.arkinstall@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jake.arkinstall@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=mime-version:references:in-reply-to:from:date:message-id:subject:to
         :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=tdnYYaZWzj+ypKfBFzPb8IijkrwuXPsDqBUbGa98Q8U=;
        b=MslMVTTvZXYhVe1kSChcqmC5TxBSbhzMzfPO4StTVbr5ssBOcVJGkV1x3cYzLsmaqz
         2TgYwLKK/4zhQ/16v8iC3u3l7jsBhkK2UXCKQ90Trqg1Q97uA38sGp+1XLrLDB+jmGLe
         zf31z294J5243wltnp/b1AJfF2MWv85Bez1OStiGPja7uFQVVH8jNK4cjbOD5MpHW0Dr
         Py5JtQwgfgCrFHkqfUSFmjPwtO6ctPHeP3XDD2pNzApPz8OGgyvEdU2AdaHI9aOBPQWm
         1Jb4QSybgEG/q6/ScBl9surk8NFVOqY9sX1RuSPU7KEJb34decZ/GGczJVSiS8IvOR3j
         KHgg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:mime-version:references:in-reply-to:from:date
         :message-id:subject:to: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=tdnYYaZWzj+ypKfBFzPb8IijkrwuXPsDqBUbGa98Q8U=;
        b=NcJ/sX7GxhdbTqOXWXRxZfPrIoxEZMT8lSWgbTXfX7iEHqXip+SQjeEA8YgrJPEKjz
         M/9FImsZ9AO15fAxJNwFfC5ruXkgBxAMxI6t5Ai6KXJ6DyZ1w+IQg7TdCqwYvfDf0jR3
         6yKqeia8zZj0/JLO7oXiQLMxMWLwzntBiZfMPaiNwu4Fmfanb98/V2u1JoWshwl8SPUh
         5Vw7x/AbseihwHDGHPaibm6LokLuR6+Dy718a2BP3rPQTx+xPbSC/0bZNMy7MHAgosBH
         Wf1hqPp2756lb2HVK5t1zhtyo5+QgCP82AI7gXrLJQlcPBkfO0IOWu4tUL7P01+RrH1/
         pZKg==
X-Gm-Message-State: AOUpUlFGIC1ssdIi++tIWsAYgQwNvUrN/x1TPguAKt/iykzH8ffyMQuJ
	VjoJLF6Nu7F+E1gYK7xRl7J2Fg==
X-Google-Smtp-Source: AA+uWPwOjtWfdps7XifoM6K1K29xpdAI4YOvvUBc8TKwcxv6fjijlV2EUdAJ5R8ZEXZScye3j/fIMQ==
X-Received: by 2002:a02:95b:: with SMTP id f88-v6mr17269641jad.28.1534522688357;
        Fri, 17 Aug 2018 09:18:08 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a24:694d:: with SMTP id e74-v6ls1533840itc.4.canary-gmail;
 Fri, 17 Aug 2018 09:18:06 -0700 (PDT)
X-Received: by 2002:a24:94f:: with SMTP id 76-v6mr25501417itm.113.1534522686801;
        Fri, 17 Aug 2018 09:18:06 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1534522686; cv=none;
        d=google.com; s=arc-20160816;
        b=CUR4mA60g9uGYS8IUzlmngObFtbxMzObmEQbAiTWkWN9X/w9EAZFVSO7HJTtrezEto
         3zn1wLwnuxmAOeoP7A7Hfqkqp/dyOI7ZRbY/xu8rncrjgECYa3lmHKAVoIbIwg74QeLB
         RpyuVlQ0ilPhgV9Zg/jEdhUocB8zUz0xKvYMskQR1OE92UM46h0lEGNqIpM7z0xYNCDz
         AZTHnmEr7J0iFhOm194OSNbldwM8ZcuJB93IubgMZr7XuoKCobzNJcWqfchju9ucv6CA
         f7D0hMqUc+ePqqv0k94IG0XPvEw+Iih5JhqPgSEYrSxjWP0lIAZ5qoi72EXEValz/71a
         zUCA==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=to:subject:message-id:date:from:in-reply-to:references:mime-version
         :dkim-signature:arc-authentication-results;
        bh=FrtrupH4fz4UJPaYlk0lM25ckrb5EsQy/UH/7UCkDEQ=;
        b=DkYibJr8HqAxxi5AYvwjYSrKXmvH3UtVICC398k7qNHAtt/F8HCic4ySa9WT5XkYZ0
         6gULE7joeL+AXeXECAWm+zo5oae8V/QAgi5+PvRcbi5J+HouGE/9ei12knSlKf2lMH+4
         JgCA9EaJn0egA2Wvrv3HuxgwltoRocplv/Rhrd0vINpSoQ+t30e52xTF3xLjKaRIExVr
         tiz/hG6VY/FDh5AInSMVxyPbYRdUKZwIxiZ/ItlW1sLyIu5ghPFNsH0eEk5BmfPW5SFR
         rhZq0zPy6OI9XWHin9+wtuFgwXyDwCVkoaBZkLYIQAo5JYgJ3EYmC1RoqaDo2Dbg0qpG
         n9Fg==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@gmail.com header.s=20161025 header.b=WVgXwhk3;
       spf=pass (google.com: domain of jake.arkinstall@gmail.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=jake.arkinstall@gmail.com;
       dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
Original-Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41])
        by mx.google.com with SMTPS id z19-v6sor896345ioe.331.2018.08.17.09.18.06
        for <std-proposals@isocpp.org>
        (Google Transport Security);
        Fri, 17 Aug 2018 09:18:06 -0700 (PDT)
Received-SPF: pass (google.com: domain of jake.arkinstall@gmail.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Received: by 2002:a6b:1c8c:: with SMTP id c134-v6mr30562716ioc.305.1534522686236;
 Fri, 17 Aug 2018 09:18:06 -0700 (PDT)
In-Reply-To: <823c098a-0fb0-18c3-82f3-e8a8616312f1@gmail.com>
X-Original-Sender: jake.arkinstall@gmail.com
X-Original-Authentication-Results: mx.google.com;       dkim=pass
 header.i=@gmail.com header.s=20161025 header.b=WVgXwhk3;       spf=pass
 (google.com: domain of jake.arkinstall@gmail.com designates 209.85.220.41 as
 permitted sender) smtp.mailfrom=jake.arkinstall@gmail.com;       dmarc=pass
 (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
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:39867
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/39867>

--0000000000009ceb970573a3e7d3
Content-Type: text/plain; charset="UTF-8"

On Fri, 17 Aug 2018, 16:16 Matthew Woehlke, <mwoehlke.floss@gmail.com>
wrote:

>
>   foo(int :a, int :b = 3, int :c = 12);
>   foo(1, c: 6); // name *must* be used here because 'b' is omitted
>

Ah. That does demolish my idea about using strong types as named wrappers
for the underlying type. Well, it makes it insufficient, at least - in
order to make it work we'd need to change the language to keep trying
parameter ordering until the types fit.

Unlike an approach that changes mangling directly, this does mean that the
following non-named code would become valid:

foo(const int& a=1, const std::string& b="hello");
foo("world"); //yuck

Which, innocent enough in this example, is going to be a source of bugs
when an implicit conversion exists - unless that ordering search matches
act as explicit, which is going to cause its own problems in terms of
usability.

>

-- 
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 email 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/CAC%2B0CCP6nzxYMpKXcCMCvi-6wq0XRGs6PZquBQ9Q4t1q_re3AA%40mail.gmail.com.

--0000000000009ceb970573a3e7d3
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"auto"><div><br><br><div class=3D"gmail_quote"><div dir=3D"ltr">=
On Fri, 17 Aug 2018, 16:16 Matthew Woehlke, &lt;<a href=3D"mailto:mwoehlke.=
floss@gmail.com" target=3D"_blank" rel=3D"noreferrer">mwoehlke.floss@gmail.=
com</a>&gt; wrote:</div><blockquote class=3D"gmail_quote" style=3D"margin:0=
 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
=C2=A0 foo(int :a, int :b =3D 3, int :c =3D 12);<br>
=C2=A0 foo(1, c: 6); // name *must* be used here because &#39;b&#39; is omi=
tted<br></blockquote></div></div><div dir=3D"auto"><br></div><div dir=3D"au=
to">Ah. That does demolish my idea about using strong types as named wrappe=
rs for the underlying type. Well, it makes it insufficient, at least - in o=
rder to make it work we&#39;d need to change the language to keep trying pa=
rameter ordering until the types fit.</div><div dir=3D"auto"><br></div><div=
 dir=3D"auto">Unlike an approach that changes mangling directly, this does =
mean that the following non-named code would become valid:</div><div dir=3D=
"auto"><br></div><div dir=3D"auto">foo(const int&amp; a=3D1, const std::str=
ing&amp; b=3D&quot;hello&quot;);</div><div dir=3D"auto">foo(&quot;world&quo=
t;); //yuck</div><div dir=3D"auto"><br></div><div dir=3D"auto">Which, innoc=
ent enough in this example, is going to be a source of bugs when an implici=
t conversion exists - unless that ordering search matches act as explicit, =
which is going to cause its own problems in terms of usability.</div><div d=
ir=3D"auto"><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
</blockquote></div></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/CAC%2B0CCP6nzxYMpKXcCMCvi-6wq0XRGs6PZ=
quBQ9Q4t1q_re3AA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter">h=
ttps://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAC%2B0CCP6nzxY=
MpKXcCMCvi-6wq0XRGs6PZquBQ9Q4t1q_re3AA%40mail.gmail.com</a>.<br />

--0000000000009ceb970573a3e7d3--

.
