Topic: Array assignment
Author: Markus Grech <markus.grech@gmail.com>
Date: Sat, 22 Apr 2017 15:51:45 -0700 (PDT)
Raw View
------=_Part_1333_922220368.1492901505524
Content-Type: multipart/alternative;
boundary="----=_Part_1334_1838868458.1492901505524"
------=_Part_1334_1838868458.1492901505524
Content-Type: text/plain; charset=UTF-8
Has this been proposed yet? Seems like a no-brainer.
int a[] = {1, 2, 3};
int b[] = a;
int c[3];
c = b;
Having to include <algorithm> and call std::copy or <cstring> for memcpy
for such a basic operation is very cumbersome.
As C++ is a language with value semantics, this should be part of the core
language.
--
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/b84c587c-b7d3-493d-92af-469ee152e81e%40isocpp.org.
------=_Part_1334_1838868458.1492901505524
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">Has this been proposed yet? Seems like a no-brainer.<div><=
br></div><div><div class=3D"prettyprint" style=3D"background-color: rgb(250=
, 250, 250); border-color: rgb(187, 187, 187); border-style: solid; border-=
width: 1px; word-wrap: break-word;"><code class=3D"prettyprint"><div class=
=3D"subprettyprint"><font color=3D"#660066"><span style=3D"color: #008;" cl=
ass=3D"styled-by-prettify">int</span><span style=3D"color: #000;" class=3D"=
styled-by-prettify"> a</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">[]</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy"> </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</=
span><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><spa=
n style=3D"color: #660;" class=3D"styled-by-prettify">{</span><span style=
=3D"color: #066;" class=3D"styled-by-prettify">1</span><span style=3D"color=
: #660;" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" =
class=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"=
styled-by-prettify">2</span><span style=3D"color: #660;" class=3D"styled-by=
-prettify">,</span><span style=3D"color: #000;" class=3D"styled-by-prettify=
"> </span><span style=3D"color: #066;" class=3D"styled-by-prettify">3</span=
><span style=3D"color: #660;" class=3D"styled-by-prettify">};</span><span s=
tyle=3D"color: #000;" class=3D"styled-by-prettify"><br></span><span style=
=3D"color: #008;" class=3D"styled-by-prettify">int</span><span style=3D"col=
or: #000;" class=3D"styled-by-prettify"> b</span><span style=3D"color: #660=
;" class=3D"styled-by-prettify">[]</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-pr=
ettify"> a</span><span style=3D"color: #660;" class=3D"styled-by-prettify">=
;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></spa=
n><span style=3D"color: #008;" class=3D"styled-by-prettify">int</span><span=
style=3D"color: #000;" class=3D"styled-by-prettify"> c</span><span style=
=3D"color: #660;" class=3D"styled-by-prettify">[</span><span style=3D"color=
: #066;" class=3D"styled-by-prettify">3</span><span style=3D"color: #660;" =
class=3D"styled-by-prettify">];</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"><br>c </span><span style=3D"color: #660;" class=3D"sty=
led-by-prettify">=3D</span><span style=3D"color: #000;" class=3D"styled-by-=
prettify"> b</span><span style=3D"color: #660;" class=3D"styled-by-prettify=
">;</span></font></div></code></div><br>Having to include <algorithm>=
and call std::copy or <cstring> for memcpy for such a basic operatio=
n is very cumbersome.</div><div>As C++ is a language with value semantics, =
this should be part of the core language.</div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/b84c587c-b7d3-493d-92af-469ee152e81e%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/b84c587c-b7d3-493d-92af-469ee152e81e=
%40isocpp.org</a>.<br />
------=_Part_1334_1838868458.1492901505524--
------=_Part_1333_922220368.1492901505524--
.
Author: Ville Voutilainen <ville.voutilainen@gmail.com>
Date: Sun, 23 Apr 2017 01:53:34 +0300
Raw View
On 23 April 2017 at 01:51, Markus Grech <markus.grech@gmail.com> wrote:
> Has this been proposed yet? Seems like a no-brainer.
>
> int a[] = {1, 2, 3};
> int b[] = a;
> int c[3];
> c = b;
>
> Having to include <algorithm> and call std::copy or <cstring> for memcpy for
> such a basic operation is very cumbersome.
> As C++ is a language with value semantics, this should be part of the core
> language.
Just use std::array and such problems go away.
--
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/CAFk2RUYXJVvv3iYK_XuQjkDPywMEbJiG-60pvUaD92Nr2qzwHw%40mail.gmail.com.
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sat, 22 Apr 2017 16:52:37 -0700 (PDT)
Raw View
------=_Part_1621_1783131661.1492905158032
Content-Type: multipart/alternative;
boundary="----=_Part_1622_1514569014.1492905158032"
------=_Part_1622_1514569014.1492905158032
Content-Type: text/plain; charset=UTF-8
On Saturday, April 22, 2017 at 6:53:36 PM UTC-4, Ville Voutilainen wrote:
>
> On 23 April 2017 at 01:51, Markus Grech <markus...@gmail.com <javascript:>>
> wrote:
> > Has this been proposed yet? Seems like a no-brainer.
> >
> > int a[] = {1, 2, 3};
> > int b[] = a;
> > int c[3];
> > c = b;
> >
> > Having to include <algorithm> and call std::copy or <cstring> for memcpy
> for
> > such a basic operation is very cumbersome.
> > As C++ is a language with value semantics, this should be part of the
> core
> > language.
>
>
> Just use std::array and such problems go away.
>
Before someone says, "But I have to write the number of elements with
`std::array`", be aware that C++17 class template deduction allows you to
mitigate that:
std::array a{1, 2, 3};
Will deduce both the type (`int`) and the count (3). Unfortunately, it
doesn't let you specify the type while deducing the count, but I can live
with that. The only real issue here is that you're (probably) limited by
the maximum argument count (at least 256), rather than the maximum size of
a braced-init-list (at least 16K).
--
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/91475cfc-5c91-47f0-a9f5-75a805314d76%40isocpp.org.
------=_Part_1622_1514569014.1492905158032
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><br>On Saturday, April 22, 2017 at 6:53:36 PM UTC-4, V=
ille Voutilainen wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0=
;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 23 A=
pril 2017 at 01:51, Markus Grech <<a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"67BXlhiWDgAJ" rel=3D"nofollow" onmousedown=3D"=
this.href=3D'javascript:';return true;" onclick=3D"this.href=3D'=
;javascript:';return true;">markus...@gmail.com</a>> wrote:
<br>> Has this been proposed yet? Seems like a no-brainer.
<br>>
<br>> int a[] =3D {1, 2, 3};
<br>> int b[] =3D a;
<br>> int c[3];
<br>> c =3D b;
<br>>
<br>> Having to include <algorithm> and call std::copy or <cstr=
ing> for memcpy for
<br>> such a basic operation is very cumbersome.
<br>> As C++ is a language with value semantics, this should be part of =
the core
<br>> language.
<br>
<br>
<br>Just use std::array and such problems go away.<br></blockquote><div><br=
>Before someone says, "But I have to write the number of elements with=
`std::array`", be aware that C++17 class template deduction allows yo=
u to mitigate that:<br><br><div style=3D"background-color: rgb(250, 250, 25=
0); border-color: rgb(187, 187, 187); border-style: solid; border-width: 1p=
x; overflow-wrap: break-word;" class=3D"prettyprint"><code class=3D"prettyp=
rint"><div class=3D"subprettyprint"><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify">std</span><span style=3D"color: #660;" class=3D"styled-b=
y-prettify">::</span><span style=3D"color: #000;" class=3D"styled-by-pretti=
fy">array a</span><span style=3D"color: #660;" class=3D"styled-by-prettify"=
>{</span><span style=3D"color: #066;" class=3D"styled-by-prettify">1</span>=
<span style=3D"color: #660;" class=3D"styled-by-prettify">,</span><span sty=
le=3D"color: #000;" class=3D"styled-by-prettify"> </span><span style=3D"col=
or: #066;" class=3D"styled-by-prettify">2</span><span style=3D"color: #660;=
" class=3D"styled-by-prettify">,</span><span style=3D"color: #000;" class=
=3D"styled-by-prettify"> </span><span style=3D"color: #066;" class=3D"style=
d-by-prettify">3</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">};</span></div></code></div><br>Will deduce both the type (`int`) and=
the count (3). Unfortunately, it doesn't let you specify the type whil=
e deducing the count, but I can live with that. The only real issue here is=
that you're (probably) limited by the maximum argument count (at least=
256), rather than the maximum size of a braced-init-list (at least 16K).<b=
r></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/91475cfc-5c91-47f0-a9f5-75a805314d76%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/91475cfc-5c91-47f0-a9f5-75a805314d76=
%40isocpp.org</a>.<br />
------=_Part_1622_1514569014.1492905158032--
------=_Part_1621_1783131661.1492905158032--
.
Author: Tony V E <tvaneerd@gmail.com>
Date: Sat, 22 Apr 2017 22:10:04 -0400
Raw View
--001a1147064c2b7e7d054dcbfdba
Content-Type: text/plain; charset=UTF-8
On Sat, Apr 22, 2017 at 6:51 PM, Markus Grech <markus.grech@gmail.com>
wrote:
> Has this been proposed yet? Seems like a no-brainer.
>
> int a[] = {1, 2, 3};
> int b[] = a;
> int c[3];
> c = b;
>
> Having to include <algorithm> and call std::copy or <cstring> for memcpy
> for such a basic operation is very cumbersome.
> As C++ is a language with value semantics, this should be part of the core
> language.
>
I just stumbled on this again this week. Even though I know it doesn't
work, I still wrote code expecting it to work :-(
--
Be seeing you,
Tony
--
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/CAOHCbitnb4MhzAqW%3Du4ODQ6T65TiPg0ib%2Bh0FDHjD7RZDha0FA%40mail.gmail.com.
--001a1147064c2b7e7d054dcbfdba
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr"><br><div class=3D"gmail_extra"><br><div class=3D"gmail_quo=
te">On Sat, Apr 22, 2017 at 6:51 PM, Markus Grech <span dir=3D"ltr"><<a =
href=3D"mailto:markus.grech@gmail.com" target=3D"_blank">markus.grech@gmail=
..com</a>></span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"ma=
rgin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"lt=
r">Has this been proposed yet? Seems like a no-brainer.<div><br></div><div>=
<div class=3D"m_1139850225236447274prettyprint" style=3D"background-color:r=
gb(250,250,250);border-color:rgb(187,187,187);border-style:solid;border-wid=
th:1px;word-wrap:break-word"><code class=3D"m_1139850225236447274prettyprin=
t"><div class=3D"m_1139850225236447274subprettyprint"><font color=3D"#66006=
6"><span style=3D"color:#008" class=3D"m_1139850225236447274styled-by-prett=
ify">int</span><span style=3D"color:#000" class=3D"m_1139850225236447274sty=
led-by-prettify"> a</span><span style=3D"color:#660" class=3D"m_11398502252=
36447274styled-by-prettify">[]</span><span style=3D"color:#000" class=3D"m_=
1139850225236447274styled-by-prettify"> </span><span style=3D"color:#660" c=
lass=3D"m_1139850225236447274styled-by-prettify">=3D</span><span style=3D"c=
olor:#000" class=3D"m_1139850225236447274styled-by-prettify"> </span><span =
style=3D"color:#660" class=3D"m_1139850225236447274styled-by-prettify">{</s=
pan><span style=3D"color:#066" class=3D"m_1139850225236447274styled-by-pret=
tify">1</span><span style=3D"color:#660" class=3D"m_1139850225236447274styl=
ed-by-prettify">,</span><span style=3D"color:#000" class=3D"m_1139850225236=
447274styled-by-prettify"> </span><span style=3D"color:#066" class=3D"m_113=
9850225236447274styled-by-prettify">2</span><span style=3D"color:#660" clas=
s=3D"m_1139850225236447274styled-by-prettify">,</span><span style=3D"color:=
#000" class=3D"m_1139850225236447274styled-by-prettify"> </span><span style=
=3D"color:#066" class=3D"m_1139850225236447274styled-by-prettify">3</span><=
span style=3D"color:#660" class=3D"m_1139850225236447274styled-by-prettify"=
>};</span><span style=3D"color:#000" class=3D"m_1139850225236447274styled-b=
y-prettify"><br></span><span style=3D"color:#008" class=3D"m_11398502252364=
47274styled-by-prettify">int</span><span style=3D"color:#000" class=3D"m_11=
39850225236447274styled-by-prettify"> b</span><span style=3D"color:#660" cl=
ass=3D"m_1139850225236447274styled-by-prettify">[]</span><span style=3D"col=
or:#000" class=3D"m_1139850225236447274styled-by-prettify"> </span><span st=
yle=3D"color:#660" class=3D"m_1139850225236447274styled-by-prettify">=3D</s=
pan><span style=3D"color:#000" class=3D"m_1139850225236447274styled-by-pret=
tify"> a</span><span style=3D"color:#660" class=3D"m_1139850225236447274sty=
led-by-prettify">;</span><span style=3D"color:#000" class=3D"m_113985022523=
6447274styled-by-prettify"><br></span><span style=3D"color:#008" class=3D"m=
_1139850225236447274styled-by-prettify">int</span><span style=3D"color:#000=
" class=3D"m_1139850225236447274styled-by-prettify"> c</span><span style=3D=
"color:#660" class=3D"m_1139850225236447274styled-by-prettify">[</span><spa=
n style=3D"color:#066" class=3D"m_1139850225236447274styled-by-prettify">3<=
/span><span style=3D"color:#660" class=3D"m_1139850225236447274styled-by-pr=
ettify">];</span><span style=3D"color:#000" class=3D"m_1139850225236447274s=
tyled-by-prettify"><br>c </span><span style=3D"color:#660" class=3D"m_11398=
50225236447274styled-by-prettify">=3D</span><span style=3D"color:#000" clas=
s=3D"m_1139850225236447274styled-by-prettify"> b</span><span style=3D"color=
:#660" class=3D"m_1139850225236447274styled-by-prettify">;</span></font></d=
iv></code></div><br>Having to include <algorithm> and call std::copy =
or <cstring> for memcpy for such a basic operation is very cumbersome=
..</div><div>As C++ is a language with value semantics, this should be part =
of the core language.</div></div></blockquote><div><br><br></div><div>I jus=
t stumbled on this again this week.=C2=A0 Even though I know it doesn't=
work, I still wrote code expecting it to work :-(<br></div></div><br>-- <b=
r><div class=3D"gmail_signature" data-smartmail=3D"gmail_signature"><div di=
r=3D"ltr"><div>Be seeing you,<br></div>Tony<br></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" 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/CAOHCbitnb4MhzAqW%3Du4ODQ6T65TiPg0ib%=
2Bh0FDHjD7RZDha0FA%40mail.gmail.com?utm_medium=3Demail&utm_source=3Dfooter"=
>https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/CAOHCbitnb4Mh=
zAqW%3Du4ODQ6T65TiPg0ib%2Bh0FDHjD7RZDha0FA%40mail.gmail.com</a>.<br />
--001a1147064c2b7e7d054dcbfdba--
.
Author: Markus Grech <markus.grech@gmail.com>
Date: Sun, 23 Apr 2017 04:07:18 -0700 (PDT)
Raw View
------=_Part_826_744113949.1492945639042
Content-Type: multipart/alternative;
boundary="----=_Part_827_2140104325.1492945639042"
------=_Part_827_2140104325.1492945639042
Content-Type: text/plain; charset=UTF-8
While std::array does solve this problem, does this mean we cannot fix C
arrays? As it is right now, I am not aware of any contexts in which this
would be valid, so this would be a non-breaking change.
Also, not everyone (including me) wants to type #include <array> or
std::array just to get this 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/5e603174-1d9e-49dc-bf0a-c68963744f78%40isocpp.org.
------=_Part_827_2140104325.1492945639042
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">While std::array does solve this problem, does this mean w=
e cannot fix C arrays? As it is right now, I am not aware of any contexts i=
n which this would be valid, so this would be a non-breaking change.<div>Al=
so, not everyone (including me) wants to type #include <array> or std=
::array just to get this functionality.</div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/5e603174-1d9e-49dc-bf0a-c68963744f78%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/5e603174-1d9e-49dc-bf0a-c68963744f78=
%40isocpp.org</a>.<br />
------=_Part_827_2140104325.1492945639042--
------=_Part_826_744113949.1492945639042--
.
Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 23 Apr 2017 10:32:21 -0300
Raw View
Em domingo, 23 de abril de 2017, =C3=A0s 08:07:18 -03, Markus Grech escreve=
u:
> While std::array does solve this problem, does this mean we cannot fix C
> arrays? As it is right now, I am not aware of any contexts in which this
> would be valid, so this would be a non-breaking change.
> Also, not everyone (including me) wants to type #include <array> or
> std::array just to get this functionality.
I believe the C language long ago decided that copying arrays should be=20
explicit, by way of memcpy, not implicit. The idea is that arrays are long =
and=20
their copying should be something thought out, not something that just=20
happened behind your back. Not to mention that arrays decay into pointers t=
oo=20
easily, so the actual type may be lost.=20
Then there two more very strong reasons:
1) arrays are passed "by reference" in function calls in C and this cannot=
=20
change. So why would we now introduce copying in another context?
2) Array lengths are not part of the array type in C and the fact that you=
=20
declared them to be N elements in size does not mean there are actually N=
=20
elements active inside. C99's solution for this is something that most=20
compilers do not implement properly and C++ does not allow either.
--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
--=20
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 e=
mail 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/3442319.2RncVlOjfg%40tjmaciei-mobl1.
.
Author: Nicol Bolas <jmckesson@gmail.com>
Date: Sun, 23 Apr 2017 07:20:48 -0700 (PDT)
Raw View
------=_Part_2606_442833928.1492957248989
Content-Type: multipart/alternative;
boundary="----=_Part_2607_384693820.1492957248989"
------=_Part_2607_384693820.1492957248989
Content-Type: text/plain; charset=UTF-8
On Sunday, April 23, 2017 at 7:07:19 AM UTC-4, Markus Grech wrote:
>
> While std::array does solve this problem, does this mean we cannot fix C
> arrays?
>
A better question is... why should we?
If we have a perfectly adequate solution right now (one that's better in
pretty much every way compared to a C array), why do we need to fix C
arrays? Why bother making a language change for a feature that is
effectively obsolete?
> As it is right now, I am not aware of any contexts in which this would be
> valid, so this would be a non-breaking change.
> Also, not everyone (including me) wants to type #include <array> or
> std::array just to get this functionality.
>
Seriously? A #include statement is too much for you to use?
--
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/026f227f-73b0-419d-a5a0-e40bc74a1fdc%40isocpp.org.
------=_Part_2607_384693820.1492957248989
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Sunday, April 23, 2017 at 7:07:19 AM UTC-4, Markus Grec=
h wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0=
..8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">While=
std::array does solve this problem, does this mean we cannot fix C arrays?=
</div></blockquote><div><br>A better question is... why should we?<br><br>I=
f we have a perfectly adequate solution right now (one that's better in=
pretty much every way compared to a C array), why do we need to fix C arra=
ys? Why bother making a language change for a feature that is effectively o=
bsolete?<br>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin: =
0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div d=
ir=3D"ltr">As it is right now, I am not aware of any contexts in which this=
would be valid, so this would be a non-breaking change.<div>Also, not ever=
yone (including me) wants to type #include <array> or std::array just=
to get this functionality.</div></div></blockquote><div><br>Seriously? A #=
include statement is too much for you to use?<br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/026f227f-73b0-419d-a5a0-e40bc74a1fdc%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/026f227f-73b0-419d-a5a0-e40bc74a1fdc=
%40isocpp.org</a>.<br />
------=_Part_2607_384693820.1492957248989--
------=_Part_2606_442833928.1492957248989--
.
Author: Andrey Semashev <andrey.semashev@gmail.com>
Date: Sun, 23 Apr 2017 17:48:19 +0300
Raw View
On 04/23/17 17:20, Nicol Bolas wrote:
>
> Seriously? A #include statement is too much for you to use?
Perhaps not so much in relation to <array>, but standard library headers
are very coarse grained, and I've had numerous situations when I or
someone else wanted to avoid including standard headers because that is
too expensive. In fact, that's a strong impediment for library-based
feature test macros.
--
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/22354f91-955c-074e-767b-fe0a5cc8a012%40gmail.com.
.
Author: Greg Marr <gregmmarr@gmail.com>
Date: Mon, 1 May 2017 10:58:57 -0700 (PDT)
Raw View
------=_Part_4073_1346133638.1493661537769
Content-Type: multipart/alternative;
boundary="----=_Part_4074_559538237.1493661537769"
------=_Part_4074_559538237.1493661537769
Content-Type: text/plain; charset=UTF-8
On Sunday, April 23, 2017 at 10:48:24 AM UTC-4, Andrey Semashev wrote:
>
> On 04/23/17 17:20, Nicol Bolas wrote:
> >
> > Seriously? A #include statement is too much for you to use?
>
> Perhaps not so much in relation to <array>, but standard library headers
> are very coarse grained, and I've had numerous situations when I or
> someone else wanted to avoid including standard headers because that is
> too expensive.
That's something that modules will take care of, and will be around before
any
hypothetical "fixing" of C arrays, so I'd say that's a non-starter as a
justification.
--
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/4ab8f496-15f7-4c53-a4db-1a15b2d3fe82%40isocpp.org.
------=_Part_4074_559538237.1493661537769
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">On Sunday, April 23, 2017 at 10:48:24 AM UTC-4, Andrey Sem=
ashev wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-lef=
t: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On 04/23/17 17:20,=
Nicol Bolas wrote:
<br>>
<br>> Seriously? A #include statement is too much for you to use?
<br>
<br>Perhaps not so much in relation to <array>, but standard library =
headers=20
<br>are very coarse grained, and I've had numerous situations when I or=
=20
<br>someone else wanted to avoid including standard headers because that is=
=20
<br>too expensive.</blockquote><div><br></div><div>That's something tha=
t modules will take care of, and will be around before any</div><div>hypoth=
etical "fixing" of C arrays, so I'd say that's a non-star=
ter as a justification.</div><div><br></div></div>
<p></p>
-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals" 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/4ab8f496-15f7-4c53-a4db-1a15b2d3fe82%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/4ab8f496-15f7-4c53-a4db-1a15b2d3fe82=
%40isocpp.org</a>.<br />
------=_Part_4074_559538237.1493661537769--
------=_Part_4073_1346133638.1493661537769--
.