220 41135 <d2bedde3-3b25-454d-acdd-96392d886343@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: Bengt Gustafsson <bengt.gustafsson@beamways.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Function Parameter of Struct Type -> Named Parameters
Date: Thu, 29 Nov 2018 13:29:15 -0800 (PST)
Lines: 113
Approved: news@gmane.org
Message-ID: <d2bedde3-3b25-454d-acdd-96392d886343@isocpp.org>
References: <CAB+4KHLe6zDPRreF2q0zQptUgrO0-_u8VrAOA7Du+_KHxhGUnw@mail.gmail.com>
 <CAHSYqdZOye=G4N4aVcQj7P2GoJVgEbXcrDCtCSW5uCxDnq4+ZQ@mail.gmail.com>
 <CAFk2RUby8T9tfLiS=Vy31GQ1Nsbk=MBEGpZ9XiASzX8Ksv7KTw@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2944_682202211.1543526955762"
X-Trace: blaine.gmane.org 1543526838 15420 195.159.176.226 (29 Nov 2018 21:27:18 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Thu, 29 Nov 2018 21:27:18 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCRIRSPDTQIRBLFUQHQAKGQEGASKJUA@isocpp.org Thu Nov 29 22:27:14 2018
Return-path: <std-proposals+bncBCRIRSPDTQIRBLFUQHQAKGQEGASKJUA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw1-f69.google.com ([209.85.161.69])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBCRIRSPDTQIRBLFUQHQAKGQEGASKJUA@isocpp.org>)
	id 1gSTq4-0003nO-Lc
	for gclcip-std-proposals@m.gmane.org; Thu, 29 Nov 2018 22:27:12 +0100
Original-Received: by mail-yw1-f69.google.com with SMTP id 21-v6sf2323195ywd.13
        for <gclcip-std-proposals@m.gmane.org>; Thu, 29 Nov 2018 13:29:18 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=+2r6mfla3KkDss1eM+vh3idfB0lOhmamIhj/SfHoCR4=;
        b=XkGFUPp0XEjUVehktn46MjlasbHJu7aV+/L9T7putzUFkDniUSUrqyILD0e86Kt7pA
         dN514iK8iR7s016f9/Lmo5yV+DvUAMIjxqUIHG4vPeOTJ9n6cC/Fv1scjF2+52f3sZgL
         x9tSMqztCAU5cuGasIZJlpLFv49tPuUm9SJm2iQ0xNSjRI729dOlTdfc9heX6O/q1xvQ
         dvmqD/dvli/1TZTVnqc0SE4Js7ScAZGRLs5DI+3vt/ShQ726sxqG7UN225uQq2VL0g/s
         fdS8ev6HKzGcZ08aAhdIxXXQWC2CTPhAplFIVV2xg9XmPg0yQhOICTErRTB/fNax9ZkD
         Mjsg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version: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=+2r6mfla3KkDss1eM+vh3idfB0lOhmamIhj/SfHoCR4=;
        b=O/KJqRnkUnTMfEuumYLP3BZvuXmoZAlEQDggegYhA02c+HL18eT9DmjcCWsuCdllfA
         n1t2r4BJVWLzaxjLMc0OKtKiwymNDd8B6LkorlxV+qmlQYUsWY2g8+cZV2lT8/Ze9G/S
         gBwSutEvpPfed87Tu9csg8Pd2EkZkW+H2pMZT+N0IrjfE9YsCLwTJlgj1oY9OBxqNrFh
         ivwwUH7uK9frXnmq91/EWQmA2Dq17r58EE/ZQeRmyJKit3eFZDAL52xLKHTCRFqPrm6D
         BGoIkK2l+8E2ZYQ8yd3wHGXW4MjbmCiE4MzaJ4s7UvYeHzPV6gB1ZLTK9b4ExoGGFCcf
         ENCg==
X-Gm-Message-State: AA+aEWYMWS2NPJdN0mzc5D1rIlvLiQuDb3mAjI6cLNrWffmpvp5SDfwn
	RnoHaNXDkHNtq9gcquHqoiVzEw==
X-Google-Smtp-Source: AFSGD/UbaQZ31I8bkfuBgak5lAVdyUt3xH4YAGLU/hZJKpUsz1B2KMPdYQHJEretIlpRX2HSh0+gcQ==
X-Received: by 2002:a25:9cc8:: with SMTP id z8-v6mr1771254ybo.97.1543526957780;
        Thu, 29 Nov 2018 13:29:17 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a81:3084:: with SMTP id w126ls1807936yww.4.gmail; Thu, 29
 Nov 2018 13:29:16 -0800 (PST)
X-Received: by 2002:a81:528b:: with SMTP id g133mr36876ywb.1.1543526956378;
        Thu, 29 Nov 2018 13:29:16 -0800 (PST)
In-Reply-To: <CAFk2RUby8T9tfLiS=Vy31GQ1Nsbk=MBEGpZ9XiASzX8Ksv7KTw@mail.gmail.com>
X-Original-Sender: bengt.gustafsson@beamways.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:41135
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41135>

------=_Part_2944_682202211.1543526955762
Content-Type: multipart/alternative; 
	boundary="----=_Part_2945_2001995475.1543526955762"

------=_Part_2945_2001995475.1543526955762
Content-Type: text/plain; charset="UTF-8"

And it also misses the possibility to call different function overloads 
depending on the names provided at the call site.

Den torsdag 29 november 2018 kl. 16:57:21 UTC+1 skrev Ville Voutilainen:
>
> On Thu, 29 Nov 2018 at 17:50, Hyman Rosen <hyman...@gmail.com 
> <javascript:>> wrote: 
> > 
> > On Wed, Nov 28, 2018 at 11:58 PM Andrew Tomazos <andrew...@gmail.com 
> <javascript:>> wrote: 
> >> 
> >> It seems to me that a function that takes a struct combined with C++20 
> >> 
> >> designated initializers gets us very close to named parameters 
> >> This also seems easy to implement. 
> >> Thoughts?  Worth pursuing? 
> > 
> > 
> > I think named argument association should be sui generis, not 
> implemented 
> > by weird class equivalents.  Doing the latter hearkens back to the days 
> of OO, 
> > where everything was defined in terms of virtual functions.  We should 
> define 
> > the behavior we want, not try for an equivalence that may or may not 
> have dark 
> > corners that don't quite match. 
>
> I don't see how an automatic struct wrapper is necessarily a good 
> solution to the problem, since it changes the arity 
> of the function. This has practical consequences; the function is no 
> longer callable with separate unnamed 
> arguments, which is a horrible loss of functionality. 
>

-- 
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/d2bedde3-3b25-454d-acdd-96392d886343%40isocpp.org.

------=_Part_2945_2001995475.1543526955762
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">And it also misses the possibility to call different funct=
ion overloads depending on the names provided at the call site.<br><br>Den =
torsdag 29 november 2018 kl. 16:57:21 UTC+1 skrev Ville Voutilainen:<blockq=
uote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-lef=
t: 1px #ccc solid;padding-left: 1ex;">On Thu, 29 Nov 2018 at 17:50, Hyman R=
osen &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D=
"CxC1yio_AgAJ" rel=3D"nofollow" onmousedown=3D"this.href=3D&#39;javascript:=
&#39;;return true;" onclick=3D"this.href=3D&#39;javascript:&#39;;return tru=
e;">hyman...@gmail.com</a>&gt; wrote:
<br>&gt;
<br>&gt; On Wed, Nov 28, 2018 at 11:58 PM Andrew Tomazos &lt;<a href=3D"jav=
ascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"CxC1yio_AgAJ" rel=3D"n=
ofollow" onmousedown=3D"this.href=3D&#39;javascript:&#39;;return true;" onc=
lick=3D"this.href=3D&#39;javascript:&#39;;return true;">andrew...@gmail.com=
</a>&gt; wrote:
<br>&gt;&gt;
<br>&gt;&gt; It seems to me that a function that takes a struct combined wi=
th C++20
<br>&gt;&gt;
<br>&gt;&gt; designated initializers gets us very close to named parameters
<br>&gt;&gt; This also seems easy to implement.
<br>&gt;&gt; Thoughts? =C2=A0Worth pursuing?
<br>&gt;
<br>&gt;
<br>&gt; I think named argument association should be sui generis, not impl=
emented
<br>&gt; by weird class equivalents. =C2=A0Doing the latter hearkens back t=
o the days of OO,
<br>&gt; where everything was defined in terms of virtual functions. =C2=A0=
We should define
<br>&gt; the behavior we want, not try for an equivalence that may or may n=
ot have dark
<br>&gt; corners that don&#39;t quite match.
<br>
<br>I don&#39;t see how an automatic struct wrapper is necessarily a good
<br>solution to the problem, since it changes the arity
<br>of the function. This has practical consequences; the function is no
<br>longer callable with separate unnamed
<br>arguments, which is a horrible loss of functionality.
<br></blockquote></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/d2bedde3-3b25-454d-acdd-96392d886343%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/d2bedde3-3b25-454d-acdd-96392d886343=
%40isocpp.org</a>.<br />

------=_Part_2945_2001995475.1543526955762--

------=_Part_2944_682202211.1543526955762--

.
