220 41473 <65d69c2c-3fa1-40a5-8120-53bfd345ac90@isocpp.org> article
Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail
From: will wray <wjwray@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Allow array as function return value
Date: Tue, 19 Feb 2019 07:52:40 -0800 (PST)
Approved: news@gmane.org
Message-ID: <65d69c2c-3fa1-40a5-8120-53bfd345ac90@isocpp.org>
References: <e1c07ac6-73d0-40c8-98a0-60a5c8a6c575@isocpp.org>
 <CAM76qmtaaQtCP_+f5Z6B3jCsruZVzSR7Q6ezcVX=zMSjq4ujcQ@mail.gmail.com>
 <8a165c32-718a-4247-93b4-44235a2cf122@isocpp.org>
 <f870e6c5-4cb2-47f8-d963-363e68626841@gmail.com>
Reply-To: std-proposals@isocpp.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_908_1554217323.1550591560645"
Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226";
	logging-data="61156"; mail-complaints-to="usenet@blaine.gmane.org"
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBC7LL4HG4IBRBSOMWDRQKGQEMB6WYYY@isocpp.org Tue Feb 19 16:52:45 2019
Return-path: <std-proposals+bncBC7LL4HG4IBRBSOMWDRQKGQEMB6WYYY@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-yw1-f70.google.com ([209.85.161.70])
	by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
	(Exim 4.89)
	(envelope-from <std-proposals+bncBC7LL4HG4IBRBSOMWDRQKGQEMB6WYYY@isocpp.org>)
	id 1gw7hM-000FnV-NS
	for gclcip-std-proposals@m.gmane.org; Tue, 19 Feb 2019 16:52:45 +0100
Original-Received: by mail-yw1-f70.google.com with SMTP id a199sf2509096ywe.23
        for <gclcip-std-proposals@m.gmane.org>; Tue, 19 Feb 2019 07:52:44 -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=a4mD6CcjQZEqy64Z3wJX68dKq/3/beWtIVro1uXhcTs=;
        b=hIBfuA1jUJfQYhlOgvDUF2wyLWJx1oKogGhHLNc0oZn/U06AoyNMhObelfCGMwhN94
         wKtwK6zEpSXWNVThaE4eyVksVwnxs1BgeeZXnLaQD8UrpOgi4YYWIh+WL5HrRLM1VGak
         3I0RI5ZF/OABnsowAqUr+ERY8whqB0f7iUXbKIRFokfcZ9hZBnVdicdwj/pNvMDFHL4J
         IqkHSOp1cmStERvZTX1b/Ya1q9QD9yO2Ke4S6KEoSQ40YZ7FsvPtXM3BI/K3Nd6ksgM2
         NUMCsJRJcHHeCt29AKuU+0mddM6qlPL54KNyeHtt15m+hXKHN3/xwsVl5EIibVuHkhBw
         lR1w==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20161025;
        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=a4mD6CcjQZEqy64Z3wJX68dKq/3/beWtIVro1uXhcTs=;
        b=AyOUMHMKQjtefSy+qf+NQ+OIZtLBAulDSkkGhGxSRVvk5zSI2NtgmFRUg66NqabMp6
         M9yc4VWAr/qrtJF/GD+YfhUV8Bo3DuoWddOLhDu2WVRZgOTZDkWaKHfw8gVakl+5tf/K
         zzIWNBje7tzYY0H3jOlr7ChTmRC/OH6qeujOnVA8aemRPu4uNvHEdfkULtOQpzQgQEwO
         4X1bclG7ZzHoomualvZ7s0DywS567ro8RQMvgkuYp0SHFjGEP34Pe7T38fr5UsfCr2Q6
         j3dLk2QbMHTTXipMl1fMSgzgfTpj7OeinsxzuqDLJHTNkCRfrxU37FbVge3SWGfvkGTv
         BjFg==
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=a4mD6CcjQZEqy64Z3wJX68dKq/3/beWtIVro1uXhcTs=;
        b=GkRBkrnlFP6ql6S8m79rjvAKUac7fW5LOciQABv86lcbZsA5dLrh5INWB/OFMa7kze
         FABKyaP7AujEXE3YPtBeGRimrpd5NZAz/Y4yJh0ntfi1HWzUuxaxgcnsjvXgJgQ4mXAF
         YhlpO3q8z1zKNO1vNf8vheiH7IMYi0fvtSjGQSzp86plPFfaHbTJIpOybVP7qR8xPd8E
         3UDJkYWXKAUWzblQ8RDmKt4pqz2po9mXNuhmdB7yw+J6onpD1S0emNTq+PZ61J9VoSXI
         k/+0kpE61jdaABvDP78GTHtqIzKMMcliHBwb7ZrsFmfyYw391UpEqBxgAYdMycNJ9fvd
         rW4g==
X-Gm-Message-State: AHQUAuaX26Duz5cVON3NPrQ6ikEzTFJoOR3lO4WxSlYRARkulypwrhgv
	jFXFoXXPwN/kfGZMnFUScHhgBw==
X-Google-Smtp-Source: AHgI3IaG0gEaff0TKOxoQAyMU3wyFh2zJsFs/4YseGPA43pTGUyygO9SLrnAmfIYIRQ7zPpY5Yt5dQ==
X-Received: by 2002:a81:2f85:: with SMTP id v127mr14425768ywv.1.1550591563109;
        Tue, 19 Feb 2019 07:52:43 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 2002:a0d:d342:: with SMTP id v63ls6483256ywd.4.gmail; Tue, 19 Feb
 2019 07:52:41 -0800 (PST)
X-Received: by 2002:a81:8483:: with SMTP id u125mr288238ywf.7.1550591561375;
        Tue, 19 Feb 2019 07:52:41 -0800 (PST)
In-Reply-To: <f870e6c5-4cb2-47f8-d963-363e68626841@gmail.com>
X-Original-Sender: wjwray@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <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:41473
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/41473>

------=_Part_908_1554217323.1550591560645
Content-Type: multipart/alternative; 
	boundary="----=_Part_909_1718410094.1550591560645"

------=_Part_909_1718410094.1550591560645
Content-Type: text/plain; charset="UTF-8"

(Trying one more time - previous attempts went to the google groups spam 
filter)

C-array is an atomic aggregate - a pure crystal condensate of one atom type.

This thread is to discuss improved language support for C-array via array 
return.

(It is not about addressing std::array shortcomings.
 It is not an either / or. 
 C-array and std::array are different tools for different tasks.)

> The fact that array return is now technically feasible shows how far C++ 
language
specification has risen above its C roots.
What was impossible for forty years is now possible.

> Raw array is analogous to raw pointer.
We've outgrown the urge to wrap all pointers - that's not so smart.
Raw pointers have been rehabilitated as the right tool for low level code.
Raw arrays deserve to be rehabilitated, with a little language level love.

On Monday, February 18, 2019 at 11:33:19 AM UTC-5, Joel Falcou wrote:
>
> C style arrays must disappear as they have no value over std::array 
>

(Eh? Trollish joke?)
C-array is essential to implement std::array - it can't and won't disappear.

std::array is a molecular aggregate, an abstract compound

> 'compound': make (something bad) worse; intensify the negative aspects of.


On Monday, February 18, 2019 at 11:33:19 AM UTC-5, Joel Falcou wrote:
>
>
> On 18/02/2019 17:24, will wray wrote: 
> > std::array is long in the tooth as an early C++11 demo class. 
>
> Wrong - it's perfectly simple for entry level. Source, I teach C++ since 
> 10 years and array has never been a problem 
> C array always have been. 
>
>
> > std::array hasn't proved itself as a 'vocabulary' type for API usage - 
> > spans and ranges supersede and they operate fine with built-in array. 
>
> std:::array is a data owner, nothing comparable to span 
>
> > std::array does not 'roundtrip' the wrapped array type; data() returns 
> > a pointer. 
>
> And ? 
>
> > std::array is awkward to use for multidimensional arrays. 
>
> Opinion, not fact 
>
> > std::array CTAD guides added for 17 only give 'all or none' deduction 
> > - you can't provide 
> > just the type and deduce size - function's deducing built-in array are 
> > more flexible. 
> Make a proposal and amend them. 
>
> builtin array are non copiable, are not object etc... 
> Is the game of give opinions instead of facts done or ? 
>
> C style arrays must disappear as they have no value over std::array 
>
>

-- 
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/65d69c2c-3fa1-40a5-8120-53bfd345ac90%40isocpp.org.

------=_Part_909_1718410094.1550591560645
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">(Trying one more time - previous attempts went to the goog=
le groups spam filter)<br><div><br><span style=3D"font-family: Roboto, &quo=
t;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: small;">C-=
array is an atomic aggregate - a pure crystal condensate of one atom type.<=
/span><div><font face=3D"Roboto, Helvetica Neue, Helvetica, Arial, sans-ser=
if" size=3D"2"><br></font><div><div><div><span style=3D"font-family: Roboto=
, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: smal=
l;">This thread is to discuss improved language support for C-array via arr=
ay return.</span></div><div><span style=3D"font-family: Roboto, &quot;Helve=
tica Neue&quot;, Helvetica, Arial, sans-serif; font-size: small;"><br></spa=
n></div><div><span style=3D"font-family: Roboto, &quot;Helvetica Neue&quot;=
, Helvetica, Arial, sans-serif; font-size: small;">(It is not about address=
ing std::array shortcomings.</span></div><div><span style=3D"font-family: R=
oboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size:=
 small;">=C2=A0It is not an either / or.=C2=A0</span></div><div>=C2=A0C-arr=
ay and std::array are different tools for different tasks.)</div><div><div =
style=3D"font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial,=
 sans-serif; font-size: small;"><blockquote class=3D"gmail_quote" style=3D"=
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockquote =
class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left: 1px =
solid rgb(204, 204, 204); padding-left: 1ex;"></blockquote></blockquote>The=
 fact that array return is now technically feasible shows how far C++ langu=
age<br>specification has risen above its C roots.</div><div style=3D"font-f=
amily: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; fo=
nt-size: small;">What was impossible for forty years is now possible.</div>=
<div style=3D"font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, A=
rial, sans-serif; font-size: small;"><blockquote class=3D"gmail_quote" styl=
e=3D"border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><blockq=
uote class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; border-left:=
 1px solid rgb(204, 204, 204); padding-left: 1ex;"></blockquote></blockquot=
e>Raw array is analogous to raw pointer.<br>We&#39;ve outgrown the urge to =
wrap all pointers - that&#39;s not so smart.<br>Raw pointers have been reha=
bilitated as the right tool for low level code.<br>Raw arrays deserve to be=
 rehabilitated, with a little language level love.</div><br style=3D"font-f=
amily: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; fo=
nt-size: small;"><span style=3D"font-family: Roboto, &quot;Helvetica Neue&q=
uot;, Helvetica, Arial, sans-serif; font-size: small;">On Monday, February =
18, 2019 at 11:33:19 AM UTC-5, Joel Falcou wrote:</span><blockquote class=
=3D"gmail_quote" style=3D"font-family: Roboto, &quot;Helvetica Neue&quot;, =
Helvetica, Arial, sans-serif; font-size: small; margin: 0px 0px 0px 0.8ex; =
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">C style arra=
ys must disappear as they have no value over std::array=C2=A0<br></blockquo=
te><div style=3D"font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica=
, Arial, sans-serif; font-size: small;"><br></div><div style=3D"font-family=
: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-si=
ze: small;">(Eh? Trollish joke?)</div><div style=3D"font-family: Roboto, &q=
uot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size: small;">=
C-array is essential to implement std::array - it can&#39;t and won&#39;t d=
isappear.</div><div style=3D"font-family: Roboto, &quot;Helvetica Neue&quot=
;, Helvetica, Arial, sans-serif; font-size: small;"><br></div><div style=3D=
"font-family: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-se=
rif; font-size: small;">std::array is a molecular aggregate, an abstract co=
mpound<div><blockquote class=3D"gmail_quote" style=3D"font-family: Arial, H=
elvetica, sans-serif; font-size: 13px; margin: 0px 0px 0px 0.8ex; border-le=
ft: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><span style=3D"font-f=
amily: Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; fo=
nt-size: small;">&#39;compound&#39;:=C2=A0</span><span style=3D"font-family=
: arial, sans-serif; font-size: small;">make (something bad) worse; intensi=
fy the negative aspects of.</span></blockquote><div style=3D"font-family: A=
rial, Helvetica, sans-serif; font-size: 13px;"><span style=3D"font-family: =
Roboto, &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif; font-size=
: small;"><br></span></div></div></div>On Monday, February 18, 2019 at 11:3=
3:19 AM UTC-5, Joel Falcou wrote:<blockquote class=3D"gmail_quote" style=3D=
"margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex=
;">
<br>On 18/02/2019 17:24, will wray wrote:
<br>&gt; std::array is long in the tooth as an early C++11 demo class.
<br>
<br>Wrong - it&#39;s perfectly simple for entry level. Source, I teach C++ =
since=20
<br>10 years and array has never been a problem
<br>C array always have been.
<br>
<br>
<br>&gt; std::array hasn&#39;t proved itself as a &#39;vocabulary&#39; type=
 for API usage -
<br>&gt; spans and ranges supersede and they operate fine with built-in arr=
ay.
<br>
<br>std:::array is a data owner, nothing comparable to span
<br>
<br>&gt; std::array does not &#39;roundtrip&#39; the wrapped array type; da=
ta() returns=20
<br>&gt; a pointer.
<br>
<br>And ?
<br>
<br>&gt; std::array is awkward to use for multidimensional arrays.
<br>
<br>Opinion, not fact
<br>
<br>&gt; std::array CTAD guides added for 17 only give &#39;all or none&#39=
; deduction=20
<br>&gt; - you can&#39;t provide
<br>&gt; just the type and deduce size - function&#39;s deducing built-in a=
rray are=20
<br>&gt; more flexible.
<br>Make a proposal and amend them.
<br>
<br>builtin array are non copiable, are not object etc...
<br>Is the game of give opinions instead of facts done or ?
<br>
<br>C style arrays must disappear as they have no value over std::array
<br>
<br></blockquote></div></div></div></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/65d69c2c-3fa1-40a5-8120-53bfd345ac90%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/65d69c2c-3fa1-40a5-8120-53bfd345ac90=
%40isocpp.org</a>.<br />

------=_Part_909_1718410094.1550591560645--

------=_Part_908_1554217323.1550591560645--

.
