220 19882 <CANu6V4VPpUSpZPuZuvFf9_-fvUTSVDB=pLvDDOham6NFgo6eQg@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: "'Johannes Schaub' via ISO C++ Standard - Future Proposals" <std-proposals@isocpp.org>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: default arguments
Date: Tue, 18 Aug 2015 11:46:18 +0200
Lines: 176
Approved: news@gmane.org
Message-ID: <CANu6V4VPpUSpZPuZuvFf9_-fvUTSVDB=pLvDDOham6NFgo6eQg@mail.gmail.com>
References: <ef9c7cbe-e8f1-4196-83bc-11a1c9b2798c@isocpp.org>
	<CANu6V4UOxgZ9GV9f8DTbtW6BXrBPA7_2yUDRyhXv5BptvybHFA@mail.gmail.com>
	<ab64c760-eeca-426a-953f-99d7a19919f6@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=001a113f92c031ac2d051d92ca8c
X-Trace: ger.gmane.org 1439891202 14196 80.91.229.3 (18 Aug 2015 09:46:42 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 18 Aug 2015 09:46:42 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCQPNCEZSQNBB2X5ZOXAKGQEKBURVAQ@isocpp.org Tue Aug 18 11:46:20 2015
Return-path: <std-proposals+bncBCQPNCEZSQNBB2X5ZOXAKGQEKBURVAQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-oi0-f70.google.com ([209.85.218.70])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCQPNCEZSQNBB2X5ZOXAKGQEKBURVAQ@isocpp.org>)
	id 1ZRdTI-0006Nx-3h
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Aug 2015 11:46:20 +0200
Original-Received: by oio137 with SMTP id 137sf271710548oio.2
        for <gclcip-std-proposals@m.gmane.org>; Tue, 18 Aug 2015 02:46:19 -0700 (PDT)
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:content-type: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=CXhORyPtvwuDTkGOx/L7iJAqpJyDWqN/nPENqlp6Wqk=;
        b=hPbvXJ6DfkT9zBPBACI42+VMgH6Jlo2fTwO7DKW2MyDcmDqUTYM66/lT44MB3cBa1y
         YyQR1m2k6iYOq3c8eBpDjfc2Ym7W037OnLN25xLrJMfxaSrNAL8m5MNXt7rcZQqZvnaP
         vrHJUXljOED0BVYg+ektNBU2OeidBt7at4aFPVHA1FOjWqLnSLqJ7gP1OsCeq2I1X5YQ
         6Ns0Cv8cWWUn0ewQMtmNuSt0YIaJnkLO4K+G7Ztyh+wI+V54YJLOBZEOhPt7/pl0eMSO
         umlNuDFP6Ywb6lrcnsoUJJiKDWxa43KURZqlSSLk6q88DS+oIpX8lJ3RRKP+KGIoz4hp
         /v8A==
X-Gm-Message-State: ALoCoQkzcN2F5JFYwVn06BMbBKJpgVNXDLKcyRcmBoXtodWUMSevWbjY81P+m966cu/8wZsY86nY
X-Received: by 10.50.4.37 with SMTP id h5mr10407400igh.12.1439891178959;
        Tue, 18 Aug 2015 02:46:18 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.3.41 with SMTP id 9ls1235060igz.7.gmail; Tue, 18 Aug 2015
 02:46:18 -0700 (PDT)
X-Received: by 10.107.10.162 with SMTP id 34mr6071758iok.139.1439891178370;
        Tue, 18 Aug 2015 02:46:18 -0700 (PDT)
Original-Received: from mail-io0-x235.google.com (mail-io0-x235.google.com. [2607:f8b0:4001:c06::235])
        by mx.google.com with ESMTPS id i5si6757177ioo.115.2015.08.18.02.46.18
        for <std-proposals@isocpp.org>
        (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 18 Aug 2015 02:46:18 -0700 (PDT)
Received-SPF: pass (google.com: domain of schaub.johannes@googlemail.com designates 2607:f8b0:4001:c06::235 as permitted sender) client-ip=2607:f8b0:4001:c06::235;
Original-Received: by iodb91 with SMTP id b91so181924114iod.1
        for <std-proposals@isocpp.org>; Tue, 18 Aug 2015 02:46:18 -0700 (PDT)
X-Received: by 10.107.10.30 with SMTP id u30mr6946796ioi.7.1439891178228; Tue,
 18 Aug 2015 02:46:18 -0700 (PDT)
Original-Received: by 10.79.81.199 with HTTP; Tue, 18 Aug 2015 02:46:18 -0700 (PDT)
Original-Received: by 10.79.81.199 with HTTP; Tue, 18 Aug 2015 02:46:18 -0700 (PDT)
In-Reply-To: <ab64c760-eeca-426a-953f-99d7a19919f6@isocpp.org>
X-Original-Sender: schaub.johannes@googlemail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of schaub.johannes@googlemail.com designates 2607:f8b0:4001:c06::235
 as permitted sender) smtp.mailfrom=schaub.johannes@googlemail.com;
       dkim=pass header.i=@googlemail.com;       dmarc=pass (p=QUARANTINE
 dis=NONE) header.from=googlemail.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: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://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>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
X-Original-From: Johannes Schaub <schaub.johannes@googlemail.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:19882
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/19882>

--001a113f92c031ac2d051d92ca8c
Content-Type: text/plain; charset=UTF-8

Am 18.08.2015 11:42 schrieb "Arthur Tchaikovsky" <atch.cpp@gmail.com>:
>
> That genuinely seems pointless/silly to me, unless you can provide some
convincing use cases.
>

These are designated initializers and why stop at making initialization
uniform just before designated initializers?

It seems natural to me to allow them in function argument lists including
for constructors. And the index notion looks like an elegant solution to
skip arguments.

> On Tuesday, 18 August 2015 10:34:39 UTC+1, Johannes Schaub wrote:
>>
>>
>> Am 15.08.2015 18:49 schrieb "Arthur Tchaikovsky" <atch...@gmail.com>:
>> >
>> > Hi,
>> > Does anyone see helpfulness of such solution:
>> > Having fnc:
>> >
>> > void f(int a = 0, int b = 1, int c = 2, int d = 3);
>> >
>> > I think that it would be nice to be able to say whilst calling it and
requiring only some of those args to be non-default:
>> >
>> > f(default,2,default,4);
>> >
>> > Thoughts?
>> >
>>
>> I would also wanna solve this with named arguments
>>
>>   f(.b = 2, .d = 4)
>>
>> And index based
>>
>>   f([1] = 2, [3] = 4)
>>
>> >
>> >
>> >
>> >
>> > --
>> >
>> > ---
>> > 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-proposal...@isocpp.org.
>> > To post to this group, send email to std-pr...@isocpp.org.
>>
>> > Visit this group at
http://groups.google.com/a/isocpp.org/group/std-proposals/.
>
> --
>
> ---
> 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.
> Visit this group at
http://groups.google.com/a/isocpp.org/group/std-proposals/.

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

--001a113f92c031ac2d051d92ca8c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr"><br>
Am 18.08.2015 11:42 schrieb &quot;Arthur Tchaikovsky&quot; &lt;<a href=3D"m=
ailto:atch.cpp@gmail.com">atch.cpp@gmail.com</a>&gt;:<br>
&gt;<br>
&gt; That genuinely seems pointless/silly to me, unless you can provide som=
e convincing use cases.<br>
&gt;</p>
<p dir=3D"ltr">These are designated initializers and why stop at making ini=
tialization uniform just before designated initializers? </p>
<p dir=3D"ltr">It seems natural to me to allow them in function argument li=
sts including for constructors. And the index notion looks like an elegant =
solution to skip arguments.<br></p>
<p dir=3D"ltr">&gt; On Tuesday, 18 August 2015 10:34:39 UTC+1, Johannes Sch=
aub wrote:<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Am 15.08.2015 18:49 schrieb &quot;Arthur Tchaikovsky&quot; &lt;<a =
href=3D"mailto:atch...@gmail.com">atch...@gmail.com</a>&gt;:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Hi, <br>
&gt;&gt; &gt; Does anyone see helpfulness of such solution:<br>
&gt;&gt; &gt; Having fnc:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; void f(int a =3D 0, int b =3D 1, int c =3D 2, int d =3D 3);<b=
r>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I think that it would be nice to be able to say whilst callin=
g it and requiring only some of those args to be non-default:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; f(default,2,default,4);<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; Thoughts?<br>
&gt;&gt; &gt;<br>
&gt;&gt;<br>
&gt;&gt; I would also wanna solve this with named arguments<br>
&gt;&gt;<br>
&gt;&gt; =C2=A0 f(.b =3D 2, .d =3D 4)<br>
&gt;&gt;<br>
&gt;&gt; And index based<br>
&gt;&gt;<br>
&gt;&gt; =C2=A0 f([1] =3D 2, [3] =3D 4)<br>
&gt;&gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; -- <br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; --- <br>
&gt;&gt; &gt; You received this message because you are subscribed to the G=
oogle Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
&gt;&gt; &gt; To unsubscribe from this group and stop receiving emails from=
 it, send an email to <a href=3D"mailto:std-proposal...@isocpp.org">std-pro=
posal...@isocpp.org</a>.<br>
&gt;&gt; &gt; To post to this group, send email to <a href=3D"mailto:std-pr=
....@isocpp.org">std-pr...@isocpp.org</a>.<br>
&gt;&gt;<br>
&gt;&gt; &gt; Visit this group at <a href=3D"http://groups.google.com/a/iso=
cpp.org/group/std-proposals/">http://groups.google.com/a/isocpp.org/group/s=
td-proposals/</a>.<br>
&gt;<br>
&gt; -- <br>
&gt;<br>
&gt; --- <br>
&gt; You received this message because you are subscribed to the Google Gro=
ups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
&gt; To unsubscribe from this group and stop receiving emails from it, send=
 an email to <a href=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-=
proposals+unsubscribe@isocpp.org</a>.<br>
&gt; To post to this group, send email to <a href=3D"mailto:std-proposals@i=
socpp.org">std-proposals@isocpp.org</a>.<br>
&gt; Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/g=
roup/std-proposals/">http://groups.google.com/a/isocpp.org/group/std-propos=
als/</a>.<br>
</p>

<p></p>

-- <br />
<br />
--- <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 />
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/">http://groups.google.com/a/isocpp.org/group/std-proposals/<=
/a>.<br />

--001a113f92c031ac2d051d92ca8c--

.
