220 19883 <1e7b94e7-364a-419d-9b12-6706ddef0fef@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Arthur Tchaikovsky <atch.cpp@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: default arguments
Date: Tue, 18 Aug 2015 03:22:15 -0700 (PDT)
Lines: 208
Approved: news@gmane.org
Message-ID: <1e7b94e7-364a-419d-9b12-6706ddef0fef@isocpp.org>
References: <ef9c7cbe-e8f1-4196-83bc-11a1c9b2798c@isocpp.org>
 <CANu6V4UOxgZ9GV9f8DTbtW6BXrBPA7_2yUDRyhXv5BptvybHFA@mail.gmail.com>
 <ab64c760-eeca-426a-953f-99d7a19919f6@isocpp.org>
 <CANu6V4VPpUSpZPuZuvFf9_-fvUTSVDB=pLvDDOham6NFgo6eQg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_201_1299394540.1439893335422"
X-Trace: ger.gmane.org 1439893339 16136 80.91.229.3 (18 Aug 2015 10:22:19 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Tue, 18 Aug 2015 10:22:19 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDL6FI4NYYERBWEOZSXAKGQE2X25W6I@isocpp.org Tue Aug 18 12:22:19 2015
Return-path: <std-proposals+bncBDL6FI4NYYERBWEOZSXAKGQE2X25W6I@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pd0-f197.google.com ([209.85.192.197])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDL6FI4NYYERBWEOZSXAKGQE2X25W6I@isocpp.org>)
	id 1ZRe26-0002md-VI
	for gclcip-std-proposals@m.gmane.org; Tue, 18 Aug 2015 12:22:19 +0200
Original-Received: by pdfx2 with SMTP id x2sf356295292pdf.2
        for <gclcip-std-proposals@m.gmane.org>; Tue, 18 Aug 2015 03:22:17 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=MTRBVsH4hIRlNKc80TByro8o5uSdkDpmgdm2mdyXo8o=;
        b=M/rs43Ef4BGkWELEmtcZzcIdjF/MkI+XwXdHLJxIgyf+3DadcqxuI7fmJKPrJW1Gtn
         fBiSTYG35tJ1a7S0veodatbFK/ABR/tDSoZhJsjx03EjHqTOFrj/NvrSQT2HoARU1IvT
         Gus0UMbrsgRNljund1ohI+WgvmRfc9E7jmyLSGWwPC7zTioq6JuafEj8oPTmCaW/xV32
         VwjxSyl0v/CqiReq8fYv+C+kgrvXXl/NNSmi6PJlwoqOPpiUvSXhgVa6zHTEahj/3EHc
         VKKazgspRTXp6GX9qs9gd2+lSHacqs5g0HEzvUWzHwgL7OvxN8Od8teYEmB+Z/UZihzL
         SbPA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post
         :list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=MTRBVsH4hIRlNKc80TByro8o5uSdkDpmgdm2mdyXo8o=;
        b=GF43Dv9a+jwJHvJclFl8+knejgcPKz/YUg6XyzBCfjPAYFO75/9BedsqI0JrZykvK4
         Gz7gxYGW+oukbkdAZtLE97/DNLPwu0zqAtl++JDJG1b/S5x6Pnz8Hlkma6kOq8osP5E2
         XOiw4NUw63EiyMpcvda9wVOWNh0maGyqyxcxTzRMxEUj+PTBtS8vbQg9dOjAutpzeNaE
         dyv5Y0q19LdCKmdc4svT4u/b0Wt+5V9/rQmbLju2FCptr7dBxXqu/F8lz8ncVK/02Mim
         ntT5CzlbvDptVl0AfjskGCGLpzwj3IH03H32espWBKDgU7CyBoY+BIFadsX15kFm/N9b
         OUow==
X-Gm-Message-State: ALoCoQkNjp7SSDFjq20zUem6oz9PCR6mxnD/PS7dNsZgECr5pa4CPasWjeY2w3r3CdAO8myS3D9n
X-Received: by 10.66.164.225 with SMTP id yt1mr5298969pab.32.1439893337732;
        Tue, 18 Aug 2015 03:22:17 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.36.170 with SMTP id p39ls2806873qgp.26.gmail; Tue, 18 Aug
 2015 03:22:16 -0700 (PDT)
X-Received: by 10.140.31.70 with SMTP id e64mr74721qge.12.1439893336265;
        Tue, 18 Aug 2015 03:22:16 -0700 (PDT)
In-Reply-To: <CANu6V4VPpUSpZPuZuvFf9_-fvUTSVDB=pLvDDOham6NFgo6eQg@mail.gmail.com>
X-Original-Sender: atch.cpp@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: <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>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:19883
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/19883>

------=_Part_201_1299394540.1439893335422
Content-Type: multipart/alternative; 
	boundary="----=_Part_202_1423641478.1439893335435"

------=_Part_202_1423641478.1439893335435
Content-Type: text/plain; charset=UTF-8

I gotta be honest with you Johann, I simply don't buy it.
And index notion looks anything but elegant solution. That is my opinion of 
course.

On Tuesday, 18 August 2015 10:46:19 UTC+1, Johannes Schaub wrote:
>
>
> Am 18.08.2015 11:42 schrieb "Arthur Tchaikovsky" <atch...@gmail.com 
> <javascript:>>:
> >
> > 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-proposal...@isocpp.org <javascript:>.
> > To post to this group, send email to std-pr...@isocpp.org <javascript:>.
> > 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/.

------=_Part_202_1423641478.1439893335435
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I gotta be honest with you Johann, I simply don&#39;t buy =
it.<br>And index notion looks anything but elegant solution. That is my opi=
nion of course.<br><br>On Tuesday, 18 August 2015 10:46:19 UTC+1, Johannes =
Schaub  wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-l=
eft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><p dir=3D"ltr"><=
br>
Am 18.08.2015 11:42 schrieb &quot;Arthur Tchaikovsky&quot; &lt;<a href=3D"j=
avascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"HjUVA-PUAwAJ" rel=3D=
"nofollow" onmousedown=3D"this.href=3D&#39;javascript:&#39;;return true;" o=
nclick=3D"this.href=3D&#39;javascript:&#39;;return true;">atch...@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>=
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>std-proposal...@isocpp.org</a>.<br>
&gt;&gt; &gt; To post to this group, send email to <a>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/" target=3D"_blank" rel=3D"nofollow" onmousedow=
n=3D"this.href=3D&#39;http://groups.google.com/a/isocpp.org/group/std-propo=
sals/&#39;;return true;" onclick=3D"this.href=3D&#39;http://groups.google.c=
om/a/isocpp.org/group/std-proposals/&#39;;return true;">http://groups.googl=
e.com/a/<wbr>isocpp.org/group/std-<wbr>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"javascript:" target=3D"_blank" gdf-obfuscated-mailt=
o=3D"HjUVA-PUAwAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascr=
ipt:&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return=
 true;">std-proposal...@<wbr>isocpp.org</a>.<br>
&gt; To post to this group, send email to <a href=3D"javascript:" target=3D=
"_blank" gdf-obfuscated-mailto=3D"HjUVA-PUAwAJ" rel=3D"nofollow" onmousedow=
n=3D"this.href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=
=3D&#39;javascript:&#39;;return true;">std-pr...@isocpp.org</a>.<br>
&gt; Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/g=
roup/std-proposals/" target=3D"_blank" rel=3D"nofollow" onmousedown=3D"this=
..href=3D&#39;http://groups.google.com/a/isocpp.org/group/std-proposals/&#39=
;;return true;" onclick=3D"this.href=3D&#39;http://groups.google.com/a/isoc=
pp.org/group/std-proposals/&#39;;return true;">http://groups.google.com/a/<=
wbr>isocpp.org/group/std-<wbr>proposals/</a>.<br>
</p>
</blockquote></div>

<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 />

------=_Part_202_1423641478.1439893335435--
------=_Part_201_1299394540.1439893335422--

.
