Topic: Proposal: make auto optional when there is const.


Author: nx02columbia@gmail.com
Date: Sat, 15 Nov 2014 20:37:46 -0800 (PST)
Raw View
------=_Part_1842_955963677.1416112666872
Content-Type: text/plain; charset=UTF-8

I am not one of the people that would like to remove auto altogether since
it would make it unclear when there is assignment or initialization.

*but* ;) when there is const I think auto is redundant.

so why not allow this:

const /*auto*/ x=1701;
const/*auto*/&  y = my_vec[74656];
const /*auto*/* const cpci= new int{47};
const /*auto* */ pci = new int{2371};
// no version for : auto* const

also in lambdas
std::sort(a.begin(),a.end(),[const& l, const& r]{return
l.size()<r.size();});

--

---
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_1842_955963677.1416112666872
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I am not one of the people that would like to remove auto =
altogether since it would make it unclear when there is assignment or initi=
alization. <br><br><u>but</u> ;) when there is const I think auto is redund=
ant.<br><br>so why not allow this:<br><br>const /*auto*/ x=3D1701;<br>const=
/*auto*/&amp;&nbsp; y =3D my_vec[74656];<br>const /*auto*/* const cpci=3D n=
ew int{47};<br>const /*auto* */ pci =3D new int{2371};<br>// no version for=
 : auto* const<br><br>also in lambdas<br>std::sort(a.begin(),a.end(),[const=
&amp; l, const&amp; r]{return l.size()&lt;r.size();});<br></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_1842_955963677.1416112666872--

.


Author: Zhihao Yuan <zy@miator.net>
Date: Sun, 16 Nov 2014 00:20:33 -0500
Raw View
On Sat, Nov 15, 2014 at 11:37 PM,  <nx02columbia@gmail.com> wrote:
>
> so why not allow this:
>
> const /*auto*/ x=1701;
> const/*auto*/&  y = my_vec[74656];
> const /*auto*/* const cpci= new int{47};
> const /*auto* */ pci = new int{2371};
> // no version for : auto* const

I have no sympathy to this coding style.  For me, `const` is
only useful when const-correntness is intended, which only
applies to interface.  In implementation (like, a local variable),
I never use `const`.

>
> also in lambdas
> std::sort(a.begin(),a.end(),[const& l, const& r]{return
> l.size()<r.size();});
>

If you look at the initial version of the generic lambda
proposal, you will find that the above syntax is right
there:

  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3418.pdf

auto you are the new static.  Amen.

--
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://bit.ly/blog4bsd

--

---
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/.

.


Author: =?ISO-8859-1?Q?Daniel_Kr=FCgler?= <daniel.kruegler@gmail.com>
Date: Sun, 16 Nov 2014 16:14:36 +0100
Raw View
2014-11-16 5:37 GMT+01:00  <nx02columbia@gmail.com>:
> I am not one of the people that would like to remove auto altogether since
> it would make it unclear when there is assignment or initialization.
>
> but ;) when there is const I think auto is redundant.

I completely disagree with that position. 'auto' as type specifier has
a clear meaning of "type needs to be deduced". This relation is
completely missing when you don't require the presence of a
placeholder for const variables. It makes it also harder to teach: I
need now to tell people: OK, usually const *adds* a qualification, but
in this special scenario it works as placeholder as well.

- Daniel

--

---
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/.

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Sun, 16 Nov 2014 17:49:43 +0100
Raw View
--001a11c11ed81e4d410507fca633
Content-Type: text/plain; charset=UTF-8

" In implementation (like, a local variable),
I never use `const`."
Well if you are a bad programmer that is fine but please dont use that as
an argument.

On 16 November 2014 06:20, Zhihao Yuan <zy@miator.net> wrote:

> On Sat, Nov 15, 2014 at 11:37 PM,  <nx02columbia@gmail.com> wrote:
> >
> > so why not allow this:
> >
> > const /*auto*/ x=1701;
> > const/*auto*/&  y = my_vec[74656];
> > const /*auto*/* const cpci= new int{47};
> > const /*auto* */ pci = new int{2371};
> > // no version for : auto* const
>
> I have no sympathy to this coding style.  For me, `const` is
> only useful when const-correntness is intended, which only
> applies to interface.  In implementation (like, a local variable),
> I never use `const`.
>
> >
> > also in lambdas
> > std::sort(a.begin(),a.end(),[const& l, const& r]{return
> > l.size()<r.size();});
> >
>
> If you look at the initial version of the generic lambda
> proposal, you will find that the above syntax is right
> there:
>
>   http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3418.pdf
>
> auto you are the new static.  Amen.
>
> --
> Zhihao Yuan, ID lichray
> The best way to predict the future is to invent it.
> ___________________________________________________
> 4BSD -- http://bit.ly/blog4bsd
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/.

--001a11c11ed81e4d410507fca633
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">&quot; In implementation (like, a local variable),<br>
I never use `const`.<span class=3D"im"></span>&quot;<br>Well if you are a b=
ad programmer that is fine but please dont use that as an argument.<br></di=
v><div class=3D"gmail_extra"><br><div class=3D"gmail_quote">On 16 November =
2014 06:20, Zhihao Yuan <span dir=3D"ltr">&lt;<a href=3D"mailto:zy@miator.n=
et" target=3D"_blank">zy@miator.net</a>&gt;</span> wrote:<br><blockquote cl=
ass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;p=
adding-left:1ex"><span class=3D"">On Sat, Nov 15, 2014 at 11:37 PM,=C2=A0 &=
lt;<a href=3D"mailto:nx02columbia@gmail.com">nx02columbia@gmail.com</a>&gt;=
 wrote:<br>
&gt;<br>
&gt; so why not allow this:<br>
&gt;<br>
&gt; const /*auto*/ x=3D1701;<br>
&gt; const/*auto*/&amp;=C2=A0 y =3D my_vec[74656];<br>
&gt; const /*auto*/* const cpci=3D new int{47};<br>
&gt; const /*auto* */ pci =3D new int{2371};<br>
&gt; // no version for : auto* const<br>
<br>
</span>I have no sympathy to this coding style.=C2=A0 For me, `const` is<br=
>
only useful when const-correntness is intended, which only<br>
applies to interface.=C2=A0 In implementation (like, a local variable),<br>
I never use `const`.<br>
<span class=3D""><br>
&gt;<br>
&gt; also in lambdas<br>
&gt; std::sort(a.begin(),a.end(),[const&amp; l, const&amp; r]{return<br>
&gt; l.size()&lt;r.size();});<br>
&gt;<br>
<br>
</span>If you look at the initial version of the generic lambda<br>
proposal, you will find that the above syntax is right<br>
there:<br>
<br>
=C2=A0 <a href=3D"http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n=
3418.pdf" target=3D"_blank">http://www.open-std.org/jtc1/sc22/wg21/docs/pap=
ers/2012/n3418.pdf</a><br>
<br>
auto you are the new static.=C2=A0 Amen.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
--<br>
Zhihao Yuan, ID lichray<br>
The best way to predict the future is to invent it.<br>
___________________________________________________<br>
4BSD -- <a href=3D"http://bit.ly/blog4bsd" target=3D"_blank">http://bit.ly/=
blog4bsd</a><br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscrib=
e@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/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></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 />

--001a11c11ed81e4d410507fca633--

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Sun, 16 Nov 2014 17:50:50 +0100
Raw View
--001a11c2cefe1fe8d10507fcaa63
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

It would also have a same meaning when it is optional... If people can
learnd ynamic languages I think they can learn language that
has const instead of blank.

On 16 November 2014 16:14, Daniel Kr=C3=BCgler <daniel.kruegler@gmail.com> =
wrote:

> 2014-11-16 5:37 GMT+01:00  <nx02columbia@gmail.com>:
> > I am not one of the people that would like to remove auto altogether
> since
> > it would make it unclear when there is assignment or initialization.
> >
> > but ;) when there is const I think auto is redundant.
>
> I completely disagree with that position. 'auto' as type specifier has
> a clear meaning of "type needs to be deduced". This relation is
> completely missing when you don't require the presence of a
> placeholder for const variables. It makes it also harder to teach: I
> need now to tell people: OK, usually const *adds* a qualification, but
> in this special scenario it works as placeholder as well.
>
> - Daniel
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/=
unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/.
>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--001a11c2cefe1fe8d10507fcaa63
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">It would also have a same meaning when it is optional... I=
f people can learnd ynamic languages I think they can learn language that <=
br>has const instead of blank.<br></div><div class=3D"gmail_extra"><br><div=
 class=3D"gmail_quote">On 16 November 2014 16:14, Daniel Kr=C3=BCgler <span=
 dir=3D"ltr">&lt;<a href=3D"mailto:daniel.kruegler@gmail.com" target=3D"_bl=
ank">daniel.kruegler@gmail.com</a>&gt;</span> wrote:<br><blockquote class=
=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padd=
ing-left:1ex">2014-11-16 5:37 GMT+01:00=C2=A0 &lt;<a href=3D"mailto:nx02col=
umbia@gmail.com">nx02columbia@gmail.com</a>&gt;:<br>
<span class=3D"">&gt; I am not one of the people that would like to remove =
auto altogether since<br>
&gt; it would make it unclear when there is assignment or initialization.<b=
r>
&gt;<br>
&gt; but ;) when there is const I think auto is redundant.<br>
<br>
</span>I completely disagree with that position. &#39;auto&#39; as type spe=
cifier has<br>
a clear meaning of &quot;type needs to be deduced&quot;. This relation is<b=
r>
completely missing when you don&#39;t require the presence of a<br>
placeholder for const variables. It makes it also harder to teach: I<br>
need now to tell people: OK, usually const *adds* a qualification, but<br>
in this special scenario it works as placeholder as well.<br>
<span class=3D"HOEnZb"><font color=3D"#888888"><br>
- Daniel<br>
</font></span><div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscrib=
e@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/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></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 />

--001a11c2cefe1fe8d10507fcaa63--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 16 Nov 2014 11:24:20 -0800
Raw View
On Sunday 16 November 2014 17:49:43 Ivan Matek wrote:
> " In implementation (like, a local variable),
> I never use `const`."
> Well if you are a bad programmer that is fine but please dont use that as
> an argument.

Do you realise you've just lost all credibility by calling someone a "bad
programmer"?

On Internet discussions, always address the comments, never the person who
made the comments.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

--

---
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/.

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Sun, 16 Nov 2014 20:33:22 +0100
Raw View
--001a11c2cefe565f360507feef0c
Content-Type: text/plain; charset=UTF-8

well his comment is crap... he doesnt use const... so what. some people
dont use vector... good for them.  i dont care.  but if they said that
fixing vector boecept spec is not needed because they dont use vector i
would tell them they should stfu.
On 16 Nov 2014 20:24, "Thiago Macieira" <thiago@macieira.org> wrote:

> On Sunday 16 November 2014 17:49:43 Ivan Matek wrote:
> > " In implementation (like, a local variable),
> > I never use `const`."
> > Well if you are a bad programmer that is fine but please dont use that as
> > an argument.
>
> Do you realise you've just lost all credibility by calling someone a "bad
> programmer"?
>
> On Internet discussions, always address the comments, never the person who
> made the comments.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>    Software Architect - Intel Open Source Technology Center
>       PGP/GPG: 0x6EF45358; fingerprint:
>       E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/.

--001a11c2cefe565f360507feef0c
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">well his comment is crap... he doesnt use const... so what. =
some people dont use vector... good for them.=C2=A0 i dont care.=C2=A0 but =
if they said that fixing vector boecept spec is not needed because they don=
t use vector i would tell them they should stfu.</p>
<div class=3D"gmail_quote">On 16 Nov 2014 20:24, &quot;Thiago Macieira&quot=
; &lt;<a href=3D"mailto:thiago@macieira.org">thiago@macieira.org</a>&gt; wr=
ote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sunday 16 No=
vember 2014 17:49:43 Ivan Matek wrote:<br>
&gt; &quot; In implementation (like, a local variable),<br>
&gt; I never use `const`.&quot;<br>
&gt; Well if you are a bad programmer that is fine but please dont use that=
 as<br>
&gt; an argument.<br>
<br>
Do you realise you&#39;ve just lost all credibility by calling someone a &q=
uot;bad<br>
programmer&quot;?<br>
<br>
On Internet discussions, always address the comments, never the person who<=
br>
made the comments.<br>
<br>
--<br>
Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" target=3D"_b=
lank">macieira.info</a> - thiago (AT) <a href=3D"http://kde.org" target=3D"=
_blank">kde.org</a><br>
=C2=A0 =C2=A0Software Architect - Intel Open Source Technology Center<br>
=C2=A0 =C2=A0 =C2=A0 PGP/GPG: 0x6EF45358; fingerprint:<br>
=C2=A0 =C2=A0 =C2=A0 E067 918B B660 DBD1 105C=C2=A0 966C 33F5 F005 6EF4 535=
8<br>
<br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscrib=
e@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/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</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 />

--001a11c2cefe565f360507feef0c--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 16 Nov 2014 11:43:38 -0800
Raw View
On Sunday 16 November 2014 20:33:22 Ivan Matek wrote:
> well his comment is crap... he doesnt use const... so what. some people
> dont use vector... good for them.  i dont care.  but if they said that
> fixing vector boecept spec is not needed because they dont use vector i
> would tell them they should stfu.

He didn't say "I don't use const". He said he doesn't use const for local
variables.

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

--

---
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/.

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Sun, 16 Nov 2014 20:47:21 +0100
Raw View
--001a113a61de671fbb0507ff215f
Content-Type: text/plain; charset=UTF-8

Well Facebook does, I hope they will soon learn better :P , but for now I
hope we can accommodate those noobs... ;)

https://github.com/facebook/folly/search?p=3&q=const&utf8=%E2%9C%93

On 16 November 2014 20:43, Thiago Macieira <thiago@macieira.org> wrote:

> On Sunday 16 November 2014 20:33:22 Ivan Matek wrote:
> > well his comment is crap... he doesnt use const... so what. some people
> > dont use vector... good for them.  i dont care.  but if they said that
> > fixing vector boecept spec is not needed because they dont use vector i
> > would tell them they should stfu.
>
> He didn't say "I don't use const". He said he doesn't use const for local
> variables.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>    Software Architect - Intel Open Source Technology Center
>       PGP/GPG: 0x6EF45358; fingerprint:
>       E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/.

--001a113a61de671fbb0507ff215f
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Well Facebook does, I hope they will soon learn better :P =
, but for now I hope we can accommodate those noobs... ;)<br><br><a href=3D=
"https://github.com/facebook/folly/search?p=3D3&amp;q=3Dconst&amp;utf8=3D%E=
2%9C%93">https://github.com/facebook/folly/search?p=3D3&amp;q=3Dconst&amp;u=
tf8=3D%E2%9C%93</a><br></div><div class=3D"gmail_extra"><br><div class=3D"g=
mail_quote">On 16 November 2014 20:43, Thiago Macieira <span dir=3D"ltr">&l=
t;<a href=3D"mailto:thiago@macieira.org" target=3D"_blank">thiago@macieira.=
org</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=3D"=
">On Sunday 16 November 2014 20:33:22 Ivan Matek wrote:<br>
&gt; well his comment is crap... he doesnt use const... so what. some peopl=
e<br>
&gt; dont use vector... good for them.=C2=A0 i dont care.=C2=A0 but if they=
 said that<br>
&gt; fixing vector boecept spec is not needed because they dont use vector =
i<br>
&gt; would tell them they should stfu.<br>
<br>
</span>He didn&#39;t say &quot;I don&#39;t use const&quot;. He said he does=
n&#39;t use const for local<br>
variables.<br>
<div class=3D"HOEnZb"><div class=3D"h5"><br>
--<br>
Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" target=3D"_b=
lank">macieira.info</a> - thiago (AT) <a href=3D"http://kde.org" target=3D"=
_blank">kde.org</a><br>
=C2=A0 =C2=A0Software Architect - Intel Open Source Technology Center<br>
=C2=A0 =C2=A0 =C2=A0 PGP/GPG: 0x6EF45358; fingerprint:<br>
=C2=A0 =C2=A0 =C2=A0 E067 918B B660 DBD1 105C=C2=A0 966C 33F5 F005 6EF4 535=
8<br>
<br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscrib=
e@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/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></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 />

--001a113a61de671fbb0507ff215f--

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Sun, 16 Nov 2014 20:48:43 +0100
Raw View
--001a11c2b36243bc990507ff26b8
Content-Type: text/plain; charset=UTF-8

ups
https://github.com/facebook/folly/search?utf8=%E2%9C%93&q=%22const+auto%22&type=Code

On 16 November 2014 20:47, Ivan Matek <nx02columbia@gmail.com> wrote:

> Well Facebook does, I hope they will soon learn better :P , but for now I
> hope we can accommodate those noobs... ;)
>
> https://github.com/facebook/folly/search?p=3&q=const&utf8=%E2%9C%93
>
> On 16 November 2014 20:43, Thiago Macieira <thiago@macieira.org> wrote:
>
>> On Sunday 16 November 2014 20:33:22 Ivan Matek wrote:
>> > well his comment is crap... he doesnt use const... so what. some people
>> > dont use vector... good for them.  i dont care.  but if they said that
>> > fixing vector boecept spec is not needed because they dont use vector i
>> > would tell them they should stfu.
>>
>> He didn't say "I don't use const". He said he doesn't use const for local
>> variables.
>>
>> --
>> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>>    Software Architect - Intel Open Source Technology Center
>>       PGP/GPG: 0x6EF45358; fingerprint:
>>       E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>>
>> --
>>
>> ---
>> You received this message because you are subscribed to a topic in the
>> Google Groups "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe
>> .
>> To unsubscribe from this group and all its topics, 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/.

--001a11c2b36243bc990507ff26b8
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">ups <br><a href=3D"https://github.com/facebook/folly/searc=
h?utf8=3D%E2%9C%93&amp;q=3D%22const+auto%22&amp;type=3DCode">https://github=
..com/facebook/folly/search?utf8=3D%E2%9C%93&amp;q=3D%22const+auto%22&amp;ty=
pe=3DCode</a><br></div><div class=3D"gmail_extra"><br><div class=3D"gmail_q=
uote">On 16 November 2014 20:47, Ivan Matek <span dir=3D"ltr">&lt;<a href=
=3D"mailto:nx02columbia@gmail.com" target=3D"_blank">nx02columbia@gmail.com=
</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin=
:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr">W=
ell Facebook does, I hope they will soon learn better :P , but for now I ho=
pe we can accommodate those noobs... ;)<br><br><a href=3D"https://github.co=
m/facebook/folly/search?p=3D3&amp;q=3Dconst&amp;utf8=3D%E2%9C%93" target=3D=
"_blank">https://github.com/facebook/folly/search?p=3D3&amp;q=3Dconst&amp;u=
tf8=3D%E2%9C%93</a><br></div><div class=3D"HOEnZb"><div class=3D"h5"><div c=
lass=3D"gmail_extra"><br><div class=3D"gmail_quote">On 16 November 2014 20:=
43, Thiago Macieira <span dir=3D"ltr">&lt;<a href=3D"mailto:thiago@macieira=
..org" target=3D"_blank">thiago@macieira.org</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex"><span>On Sunday 16 November 2014 20:33:22 Ivan Mat=
ek wrote:<br>
&gt; well his comment is crap... he doesnt use const... so what. some peopl=
e<br>
&gt; dont use vector... good for them.=C2=A0 i dont care.=C2=A0 but if they=
 said that<br>
&gt; fixing vector boecept spec is not needed because they dont use vector =
i<br>
&gt; would tell them they should stfu.<br>
<br>
</span>He didn&#39;t say &quot;I don&#39;t use const&quot;. He said he does=
n&#39;t use const for local<br>
variables.<br>
<div><div><br>
--<br>
Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" target=3D"_b=
lank">macieira.info</a> - thiago (AT) <a href=3D"http://kde.org" target=3D"=
_blank">kde.org</a><br>
=C2=A0 =C2=A0Software Architect - Intel Open Source Technology Center<br>
=C2=A0 =C2=A0 =C2=A0 PGP/GPG: 0x6EF45358; fingerprint:<br>
=C2=A0 =C2=A0 =C2=A0 E067 918B B660 DBD1 105C=C2=A0 966C 33F5 F005 6EF4 535=
8<br>
<br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org" target=3D"_blank">std-pr=
oposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></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 />

--001a11c2b36243bc990507ff26b8--

.


Author: David Krauss <potswa@gmail.com>
Date: Sun, 16 Nov 2014 21:34:08 +0800
Raw View
--Apple-Mail=_1299A5D6-5196-4F21-BFA0-073CAABAC170
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


On 2014=E2=80=9311=E2=80=9316, at 1:20 PM, Zhihao Yuan <zy@miator.net> wrot=
e:

> auto you are the new static.  Amen.

=E2=80=9CThe Next Generation=E2=80=9D static, that is.

Except implicit static (given const, as it happens) was done to prevent qui=
etly lurking linkage errors, but the only justification for implicit auto i=
s to save five keystrokes.

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--Apple-Mail=_1299A5D6-5196-4F21-BFA0-073CAABAC170
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dwindows-1252"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-=
mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 2014=
=E2=80=9311=E2=80=9316, at 1:20 PM, Zhihao Yuan &lt;<a href=3D"mailto:zy@mi=
ator.net">zy@miator.net</a>&gt; wrote:</div><br class=3D"Apple-interchange-=
newline"><blockquote type=3D"cite">auto you are the new static. &nbsp;Amen.=
<br></blockquote></div><br><div>=E2=80=9CThe Next Generation=E2=80=9D <font=
 face=3D"Courier">static</font>, that is.</div><div><br></div><div>Except i=
mplicit <font face=3D"Courier">static</font>&nbsp;(given <font face=3D"Cour=
ier">const</font>, as it happens) was done to prevent quietly lurking linka=
ge errors, but the only justification for implicit <font face=3D"Courier">a=
uto</font> is to save five keystrokes.</div></body></html>

<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 />

--Apple-Mail=_1299A5D6-5196-4F21-BFA0-073CAABAC170--

.


Author: David Krauss <potswa@gmail.com>
Date: Mon, 17 Nov 2014 07:51:33 +0800
Raw View
--Apple-Mail=_38D875A7-EBEC-4A98-A01B-6B43962711B8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


On 2014=E2=80=9311=E2=80=9317, at 3:48 AM, Ivan Matek <nx02columbia@gmail.c=
om> wrote:

> ups=20
> https://github.com/facebook/folly/search?utf8=3D%E2%9C%93&q=3D%22const+au=
to%22&type=3DCode

I don=E2=80=99t see any const local variables in there.

Zhihao was only mentioning his own style anyway. It doesn=E2=80=99t mean he=
 wants everyone to write like himself.

The relevant topic is what kinds of style we=E2=80=99re all willing to read=
, because anything that=E2=80=99s obtuse or potentially hard for humans to =
parse shouldn=E2=80=99t be standardized.

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--Apple-Mail=_38D875A7-EBEC-4A98-A01B-6B43962711B8
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dutf-8"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: s=
pace; -webkit-line-break: after-white-space;"><br><div><div>On 2014=E2=80=
=9311=E2=80=9317, at 3:48 AM, Ivan Matek &lt;<a href=3D"mailto:nx02columbia=
@gmail.com">nx02columbia@gmail.com</a>&gt; wrote:</div><br class=3D"Apple-i=
nterchange-newline"><blockquote type=3D"cite"><div dir=3D"ltr">ups <br><a h=
ref=3D"https://github.com/facebook/folly/search?utf8=3D=E2=9C=93&amp;q=3D&q=
uot;const+auto&quot;&amp;type=3DCode">https://github.com/facebook/folly/sea=
rch?utf8=3D%E2%9C%93&amp;q=3D%22const+auto%22&amp;type=3DCode</a><br></div>=
</blockquote><div><br></div><div>I don=E2=80=99t see any const local variab=
les in there.</div></div><br><div>Zhihao was only mentioning his own style =
anyway. It doesn=E2=80=99t mean he wants everyone to write like himself.</d=
iv><div><br></div><div>The relevant topic is what kinds of style we=E2=80=
=99re all willing to read, because anything that=E2=80=99s obtuse or potent=
ially hard for humans to parse shouldn=E2=80=99t be standardized.</div></bo=
dy></html>

<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 />

--Apple-Mail=_38D875A7-EBEC-4A98-A01B-6B43962711B8--

.


Author: Ed <morwenn29@gmail.com>
Date: Sun, 16 Nov 2014 16:25:25 -0800 (PST)
Raw View
------=_Part_519_1608280758.1416183925330
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

To add my grain of salt: I am not in favor of such a change. To me, "auto"=
=20
and "decltype" mean "deduced type",
and that is clear for everybody reading the code. If I read something like=
=20
"const bar =3D foo;", I will not be sure
whether the auto part was intentionally left out or simply forgotten.=20
That's not great for code reviews.

Le dimanche 16 novembre 2014 05:37:46 UTC+1, nx02co...@gmail.com a =C3=A9cr=
it :
>
> I am not one of the people that would like to remove auto altogether sinc=
e=20
> it would make it unclear when there is assignment or initialization.=20
>
> *but* ;) when there is const I think auto is redundant.
>
> so why not allow this:
>
> const /*auto*/ x=3D1701;
> const/*auto*/&  y =3D my_vec[74656];
> const /*auto*/* const cpci=3D new int{47};
> const /*auto* */ pci =3D new int{2371};
> // no version for : auto* const
>
> also in lambdas
> std::sort(a.begin(),a.end(),[const& l, const& r]{return=20
> l.size()<r.size();});
>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_519_1608280758.1416183925330
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">To add my grain of salt: I am not in favor of such a chang=
e. To me, "auto" and "decltype" mean "deduced type",<br>and that is clear f=
or everybody reading the code. If I read something like "const bar =3D foo;=
", I will not be sure<br>whether the auto part was intentionally left out o=
r simply forgotten. That's not great for code reviews.<br><br>Le dimanche 1=
6 novembre 2014 05:37:46 UTC+1, nx02co...@gmail.com a =C3=A9crit&nbsp;:<blo=
ckquote class=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-=
left: 1px #ccc solid;padding-left: 1ex;"><div dir=3D"ltr">I am not one of t=
he people that would like to remove auto altogether since it would make it =
unclear when there is assignment or initialization. <br><br><u>but</u> ;) w=
hen there is const I think auto is redundant.<br><br>so why not allow this:=
<br><br>const /*auto*/ x=3D1701;<br>const/*auto*/&amp;&nbsp; y =3D my_vec[7=
4656];<br>const /*auto*/* const cpci=3D new int{47};<br>const /*auto* */ pc=
i =3D new int{2371};<br>// no version for : auto* const<br><br>also in lamb=
das<br>std::sort(a.begin(),a.end(),[<wbr>const&amp; l, const&amp; r]{return=
 l.size()&lt;r.size();});<br></div></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_519_1608280758.1416183925330--

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Sun, 16 Nov 2014 17:03:01 -0800
Raw View
On Sunday 16 November 2014 16:25:25 Ed wrote:
> and that is clear for everybody reading the code. If I read something like
> "const bar = foo;", I will not be sure
> whether the auto part was intentionally left out or simply forgotten.
> That's not great for code reviews.

I'd also wonder if "bar" was the type name or the variable name. It's
confusing enough that I might read it in the same light as this:

struct S { int i; };
void f() { S{}; }

Note that you can write:

 const S S{1};

because you *can* declare variables with the same name as type names in an
outer scope.

Now, remember you can declare variables in the context of a single statement,
even if they are not very useful:

 S{1}

So if I read

 const S{1};

I wouldn't know if this is declaring a nameless temporary of type const S or
if it's declaring a const /*auto*/ of initializer list, as a shortened version
of:

 const auto S{1};

--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

--

---
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/.

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Mon, 17 Nov 2014 02:05:18 +0100
Raw View
--001a113a61de78f0340508039279
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

I do. :)  github search sucks or i cant google how to do equivalent of
google "const auto&" but i can find them manually going through search
results...
On 17 Nov 2014 00:51, "David Krauss" <potswa@gmail.com> wrote:

>
> On 2014=E2=80=9311=E2=80=9317, at 3:48 AM, Ivan Matek <nx02columbia@gmail=
..com> wrote:
>
> ups
>
> https://github.com/facebook/folly/search?utf8=3D%E2%9C%93&q=3D%22const+au=
to%22&type=3DCode
> <https://github.com/facebook/folly/search?utf8=3D=E2=9C=93&q=3D%22const+a=
uto%22&type=3DCode>
>
>
> I don=E2=80=99t see any const local variables in there.
>
> Zhihao was only mentioning his own style anyway. It doesn=E2=80=99t mean =
he wants
> everyone to write like himself.
>
> The relevant topic is what kinds of style we=E2=80=99re all willing to re=
ad,
> because anything that=E2=80=99s obtuse or potentially hard for humans to =
parse
> shouldn=E2=80=99t be standardized.
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/=
unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/.
>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--001a113a61de78f0340508039279
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">I do. :)=C2=A0 github search sucks or i cant google how to d=
o equivalent of google &quot;const auto&amp;&quot; but i can find them manu=
ally going through search results...</p>
<div class=3D"gmail_quote">On 17 Nov 2014 00:51, &quot;David Krauss&quot; &=
lt;<a href=3D"mailto:potswa@gmail.com">potswa@gmail.com</a>&gt; wrote:<br t=
ype=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style=3D"word-wrap:=
break-word"><br><div><div>On 2014=E2=80=9311=E2=80=9317, at 3:48 AM, Ivan M=
atek &lt;<a href=3D"mailto:nx02columbia@gmail.com" target=3D"_blank">nx02co=
lumbia@gmail.com</a>&gt; wrote:</div><br><blockquote type=3D"cite"><div dir=
=3D"ltr">ups <br><a href=3D"https://github.com/facebook/folly/search?utf8=
=3D=E2=9C=93&amp;q=3D%22const+auto%22&amp;type=3DCode" target=3D"_blank">ht=
tps://github.com/facebook/folly/search?utf8=3D%E2%9C%93&amp;q=3D%22const+au=
to%22&amp;type=3DCode</a><br></div></blockquote><div><br></div><div>I don=
=E2=80=99t see any const local variables in there.</div></div><br><div>Zhih=
ao was only mentioning his own style anyway. It doesn=E2=80=99t mean he wan=
ts everyone to write like himself.</div><div><br></div><div>The relevant to=
pic is what kinds of style we=E2=80=99re all willing to read, because anyth=
ing that=E2=80=99s obtuse or potentially hard for humans to parse shouldn=
=E2=80=99t be standardized.</div></div>

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_blank">std-prop=
osals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</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 />

--001a113a61de78f0340508039279--

.


Author: David Krauss <potswa@gmail.com>
Date: Mon, 17 Nov 2014 09:06:24 +0800
Raw View
--Apple-Mail=_C9624AFF-A385-4828-93AE-F570D255DDAD
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain; charset=UTF-8


On 2014=E2=80=9311=E2=80=9317, at 9:05 AM, Ivan Matek <nx02columbia@gmail.c=
om> wrote:

> I do. :)  github search sucks or i cant google how to do equivalent of go=
ogle "const auto&" but i can find them manually going through search result=
s...
>=20
References don=E2=80=99t count. The reference isn=E2=80=99t const per se, i=
t refers to something that may be const.

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--Apple-Mail=_C9624AFF-A385-4828-93AE-F570D255DDAD
Content-Transfer-Encoding: quoted-printable
Content-Type: text/html; charset=UTF-8

<html><head><meta http-equiv=3D"Content-Type" content=3D"text/html charset=
=3Dwindows-1252"></head><body style=3D"word-wrap: break-word; -webkit-nbsp-=
mode: space; -webkit-line-break: after-white-space;"><br><div><div>On 2014=
=E2=80=9311=E2=80=9317, at 9:05 AM, Ivan Matek &lt;<a href=3D"mailto:nx02co=
lumbia@gmail.com">nx02columbia@gmail.com</a>&gt; wrote:</div><br class=3D"A=
pple-interchange-newline"><blockquote type=3D"cite"><p dir=3D"ltr">I do. :)=
&nbsp; github search sucks or i cant google how to do equivalent of google =
"const auto&amp;" but i can find them manually going through search results=
....</p></blockquote><div>References don=E2=80=99t count. The reference isn=
=E2=80=99t const per se, it refers to something that may be const.</div><di=
v><br></div></div></body></html>

<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 />

--Apple-Mail=_C9624AFF-A385-4828-93AE-F570D255DDAD--

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Mon, 17 Nov 2014 02:11:57 +0100
Raw View
--001a113a9c904265b8050803aab1
Content-Type: text/plain; charset=UTF-8

nhf but if you dont want to participate nobody is forcing you.... but if
you do put at least some basic effort. i can find examples of const auto...
for example const auto fd =.... const auto actual =...
On 17 Nov 2014 02:06, "David Krauss" <potswa@gmail.com> wrote:

>
> On 2014-11-17, at 9:05 AM, Ivan Matek <nx02columbia@gmail.com> wrote:
>
> I do. :)  github search sucks or i cant google how to do equivalent of
> google "const auto&" but i can find them manually going through search
> results...
>
> References don't count. The reference isn't const per se, it refers to
> something that may be const.
>
>  --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/.

--001a113a9c904265b8050803aab1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">nhf but if you dont want to participate nobody is forcing yo=
u.... but if you do put at least some basic effort. i can find examples of =
const auto... for example const auto fd =3D.... const auto actual =3D...&nb=
sp;&nbsp;&nbsp; </p>
<div class=3D"gmail_quote">On 17 Nov 2014 02:06, &quot;David Krauss&quot; &=
lt;<a href=3D"mailto:potswa@gmail.com">potswa@gmail.com</a>&gt; wrote:<br t=
ype=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0=
 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style=3D"word-wrap:=
break-word"><br><div><div>On 2014&ndash;11&ndash;17, at 9:05 AM, Ivan Matek=
 &lt;<a href=3D"mailto:nx02columbia@gmail.com" target=3D"_blank">nx02columb=
ia@gmail.com</a>&gt; wrote:</div><br><blockquote type=3D"cite"><p dir=3D"lt=
r">I do. :)&nbsp; github search sucks or i cant google how to do equivalent=
 of google &quot;const auto&amp;&quot; but i can find them manually going t=
hrough search results...</p></blockquote><div>References don&rsquo;t count.=
 The reference isn&rsquo;t const per se, it refers to something that may be=
 const.</div><div><br></div></div></div>

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_blank">std-prop=
osals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</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 />

--001a113a9c904265b8050803aab1--

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Mon, 17 Nov 2014 02:20:29 +0100
Raw View
--001a11c23948bc2d0c050803c801
Content-Type: text/plain; charset=UTF-8

this seems like a reasonable objection... again witgkit using this
hypothetical cpp version hard to say would it be a real problem  or people
would get used to it quickly...
On 17 Nov 2014 02:03, "Thiago Macieira" <thiago@macieira.org> wrote:

> On Sunday 16 November 2014 16:25:25 Ed wrote:
> > and that is clear for everybody reading the code. If I read something
> like
> > "const bar = foo;", I will not be sure
> > whether the auto part was intentionally left out or simply forgotten.
> > That's not great for code reviews.
>
> I'd also wonder if "bar" was the type name or the variable name. It's
> confusing enough that I might read it in the same light as this:
>
> struct S { int i; };
> void f() { S{}; }
>
> Note that you can write:
>
>         const S S{1};
>
> because you *can* declare variables with the same name as type names in an
> outer scope.
>
> Now, remember you can declare variables in the context of a single
> statement,
> even if they are not very useful:
>
>         S{1}
>
> So if I read
>
>         const S{1};
>
> I wouldn't know if this is declaring a nameless temporary of type const S
> or
> if it's declaring a const /*auto*/ of initializer list, as a shortened
> version
> of:
>
>         const auto S{1};
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>    Software Architect - Intel Open Source Technology Center
>       PGP/GPG: 0x6EF45358; fingerprint:
>       E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/.

--001a11c23948bc2d0c050803c801
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">this seems like a reasonable objection... again witgkit usin=
g this hypothetical cpp version hard to say would it be a real problem=C2=
=A0 or people would get used to it quickly...</p>
<div class=3D"gmail_quote">On 17 Nov 2014 02:03, &quot;Thiago Macieira&quot=
; &lt;<a href=3D"mailto:thiago@macieira.org">thiago@macieira.org</a>&gt; wr=
ote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Sunday 16 No=
vember 2014 16:25:25 Ed wrote:<br>
&gt; and that is clear for everybody reading the code. If I read something =
like<br>
&gt; &quot;const bar =3D foo;&quot;, I will not be sure<br>
&gt; whether the auto part was intentionally left out or simply forgotten.<=
br>
&gt; That&#39;s not great for code reviews.<br>
<br>
I&#39;d also wonder if &quot;bar&quot; was the type name or the variable na=
me. It&#39;s<br>
confusing enough that I might read it in the same light as this:<br>
<br>
struct S { int i; };<br>
void f() { S{}; }<br>
<br>
Note that you can write:<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 const S S{1};<br>
<br>
because you *can* declare variables with the same name as type names in an<=
br>
outer scope.<br>
<br>
Now, remember you can declare variables in the context of a single statemen=
t,<br>
even if they are not very useful:<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 S{1}<br>
<br>
So if I read<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 const S{1};<br>
<br>
I wouldn&#39;t know if this is declaring a nameless temporary of type const=
 S or<br>
if it&#39;s declaring a const /*auto*/ of initializer list, as a shortened =
version<br>
of:<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 const auto S{1};<br>
<br>
--<br>
Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" target=3D"_b=
lank">macieira.info</a> - thiago (AT) <a href=3D"http://kde.org" target=3D"=
_blank">kde.org</a><br>
=C2=A0 =C2=A0Software Architect - Intel Open Source Technology Center<br>
=C2=A0 =C2=A0 =C2=A0 PGP/GPG: 0x6EF45358; fingerprint:<br>
=C2=A0 =C2=A0 =C2=A0 E067 918B B660 DBD1 105C=C2=A0 966C 33F5 F005 6EF4 535=
8<br>
<br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscrib=
e@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/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</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 />

--001a11c23948bc2d0c050803c801--

.


Author: Douglas Boffey <douglas.boffey@gmail.com>
Date: Mon, 17 Nov 2014 03:27:13 -0800 (PST)
Raw View
------=_Part_2849_2072631046.1416223633552
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable


On Sunday, 16 November 2014 04:37:46 UTC, nx02co...@gmail.com wrote:
>
> I am not one of the people that would like to remove auto altogether sinc=
e=20
> it would make it unclear when there is assignment or initialization.=20
>
> Definitely agree, but for a different reason:
=20
I find languages with implicit declarations problematic.  I remember=20
reading one program recently (written in VBA without the =E2=80=98Option=20
Explicit=E2=80=99), and although variables were (sometimes) declared, there=
 were=20
occasions where there was a typo in the variable name (either in the=20
declaration, or elsewhere), and so the compiler thought that different=20
variables were intended.
=20

> *but* ;) when there is const I think auto is redundant.
>
I can see no advantage in eliding =E2=80=98auto=E2=80=99, except as already=
 been mentioned,=20
to save a few keystrokes.=20

> =20
>
so why not allow this:
>
> const /*auto*/ x=3D1701;
> const/*auto*/&  y =3D my_vec[74656];
> const /*auto*/* const cpci=3D new int{47};
> const /*auto* */ pci =3D new int{2371};
> // no version for : auto* const
>
> Hmm, is the fourth example correct?  Should
=20
const pci =3D new =E2=80=A6 // Note, no indication that it is a pointer in =
the=20
declaration
=20
be semantically correct?=20
=20

> also in lambdas
> std::sort(a.begin(),a.end(),[const& l, const& r]{return=20
> l.size()<r.size();});
>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

------=_Part_2849_2072631046.1416223633552
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br>On Sunday, 16 November 2014 04:37:46 UTC, nx02co...@gm=
ail.com  wrote:<blockquote style=3D"margin: 0px 0px 0px 0.8ex; padding-left=
: 1ex; border-left-color: rgb(204, 204, 204); border-left-width: 1px; borde=
r-left-style: solid;" class=3D"gmail_quote"><div dir=3D"ltr">I am not one o=
f the people that would like to remove auto altogether since it would make =
it unclear when there is assignment or initialization. <br><br></div></bloc=
kquote><div>Definitely agree, but for&nbsp;a different reason:</div><div>&n=
bsp;</div><div>I find languages with&nbsp;implicit declarations&nbsp;proble=
matic.&nbsp; I remember reading one program recently (written in VBA withou=
t the =E2=80=98Option Explicit=E2=80=99), and although variables were (some=
times) declared, there were occasions where there was a typo&nbsp;in the va=
riable name (either in the declaration, or elsewhere), and so the compiler =
thought&nbsp;that different variables were intended.</div><div>&nbsp;</div>=
<blockquote style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-l=
eft-color: rgb(204, 204, 204); border-left-width: 1px; border-left-style: s=
olid;" class=3D"gmail_quote"><div dir=3D"ltr"><u>but</u> ;) when there is c=
onst I think auto is redundant.<br></div></blockquote><div>I can see no adv=
antage in eliding =E2=80=98auto=E2=80=99, except as already been mentioned,=
 to save a few keystrokes.&nbsp;</div><blockquote style=3D"margin: 0px 0px =
0px 0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border=
-left-width: 1px; border-left-style: solid;" class=3D"gmail_quote"><div dir=
=3D"ltr">&nbsp;</div></blockquote><blockquote style=3D"margin: 0px 0px 0px =
0.8ex; padding-left: 1ex; border-left-color: rgb(204, 204, 204); border-lef=
t-width: 1px; border-left-style: solid;" class=3D"gmail_quote"><div dir=3D"=
ltr">so why not allow this:<br><br>const /*auto*/ x=3D1701;<br>const/*auto*=
/&amp;&nbsp; y =3D my_vec[74656];<br>const /*auto*/* const cpci=3D new int{=
47};<br>const /*auto* */ pci =3D new int{2371};<br>// no version for : auto=
* const<br><br></div></blockquote><div>Hmm, is the fourth example correct?&=
nbsp; Should</div><div>&nbsp;</div><div>const pci =3D new =E2=80=A6 // Note=
, no&nbsp;indication that it is a pointer in the declaration</div><div>&nbs=
p;</div><div>be semantically correct?&nbsp;</div><div>&nbsp;</div><blockquo=
te style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color=
: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;" cl=
ass=3D"gmail_quote"><div dir=3D"ltr">also in lambdas<br>std::sort(a.begin()=
,a.end(),[<wbr>const&amp; l, const&amp; r]{return l.size()&lt;r.size();});<=
br></div></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_2849_2072631046.1416223633552--

.


Author: =?UTF-8?Q?David_Rodr=C3=ADguez_Ibeas?= <dibeas@ieee.org>
Date: Mon, 17 Nov 2014 13:44:45 +0000
Raw View
--001a113fbe2ead5f7905080e2eed
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

@Ivan Matek: Yes there are good uses of auto for local variables, I do this
my self, but Yes, you could have addressed this in a more productive way:

.... the use of 'const' in local variables is part of building a
const-correct program, it is telling the compiler that if an attempt to
change this local variable by mistake (either directly or through a member
function) is done, this is unintentional and should be flagged.

I find the above statement more productive for the overall discussion than
"if you are a bad programmer" --He might be a great programmer that does
not use the tools to its full extent, who knows?

On dropping the need for 'auto', I think there is mostly consensus that the
advantage is just to remove a couple of keystrokes and it could potentially
complicate the language (more exceptions to be taught...). I don't think it
will be as confusing as the VB case stated above ('const' cannot appear
outside of a declaration), but I don't see the removal of 5 keystrokes
(including the space) worth even the discussion.

    David

On Mon Nov 17 2014 at 6:27:14 AM Douglas Boffey <douglas.boffey@gmail.com>
wrote:

>
> On Sunday, 16 November 2014 04:37:46 UTC, nx02co...@gmail.com wrote:
>>
>> I am not one of the people that would like to remove auto altogether
>> since it would make it unclear when there is assignment or initializatio=
n.
>>
>> Definitely agree, but for a different reason:
>
> I find languages with implicit declarations problematic.  I remember
> reading one program recently (written in VBA without the =E2=80=98Option
> Explicit=E2=80=99), and although variables were (sometimes) declared, the=
re were
> occasions where there was a typo in the variable name (either in the
> declaration, or elsewhere), and so the compiler thought that different
> variables were intended.
>
>
>> *but* ;) when there is const I think auto is redundant.
>>
> I can see no advantage in eliding =E2=80=98auto=E2=80=99, except as alrea=
dy been
> mentioned, to save a few keystrokes.
>
>>
>>
> so why not allow this:
>>
>> const /*auto*/ x=3D1701;
>> const/*auto*/&  y =3D my_vec[74656];
>> const /*auto*/* const cpci=3D new int{47};
>> const /*auto* */ pci =3D new int{2371};
>> // no version for : auto* const
>>
>> Hmm, is the fourth example correct?  Should
>
> const pci =3D new =E2=80=A6 // Note, no indication that it is a pointer i=
n the
> declaration
>
> be semantically correct?
>
>
>> also in lambdas
>> std::sort(a.begin(),a.end(),[const& l, const& r]{return
>> l.size()<r.size();});
>>
>  --
>
> ---
> 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/.
>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--001a113fbe2ead5f7905080e2eed
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

@Ivan Matek: Yes there are good uses of auto for local variables, I do this=
 my self, but Yes, you could have addressed this in a more productive way:<=
br><br>... the use of &#39;const&#39; in local variables is part of buildin=
g a const-correct program, it is telling the compiler that if an attempt to=
 change this local variable by mistake (either directly or through a member=
 function) is done, this is unintentional and should be flagged.<br><br>I f=
ind the above statement more productive for the overall discussion than &qu=
ot;if you are a bad programmer&quot; --He might be a great programmer that =
does not use the tools to its full extent, who knows?<br><br>On dropping th=
e need for &#39;auto&#39;, I think there is mostly consensus that the advan=
tage is just to remove a couple of keystrokes and it could potentially comp=
licate the language (more exceptions to be taught...). I don&#39;t think it=
 will be as confusing as the VB case stated above (&#39;const&#39; cannot a=
ppear outside of a declaration), but I don&#39;t see the removal of 5 keyst=
rokes (including the space) worth even the discussion.<br><br>=C2=A0 =C2=A0=
 David<br><br><div class=3D"gmail_quote">On Mon Nov 17 2014 at 6:27:14 AM D=
ouglas Boffey &lt;<a href=3D"mailto:douglas.boffey@gmail.com">douglas.boffe=
y@gmail.com</a>&gt; 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"><br>On Sunday, 16 November 2014 04:37:46 UTC, <a href=3D"mailto:nx02co..=
..@gmail.com" target=3D"_blank">nx02co...@gmail.com</a>  wrote:<blockquote s=
tyle=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204=
,204,204);border-left-width:1px;border-left-style:solid" class=3D"gmail_quo=
te"><div dir=3D"ltr">I am not one of the people that would like to remove a=
uto altogether since it would make it unclear when there is assignment or i=
nitialization. <br><br></div></blockquote></div><div dir=3D"ltr"><div>Defin=
itely agree, but for=C2=A0a different reason:</div><div>=C2=A0</div><div>I =
find languages with=C2=A0implicit declarations=C2=A0problematic.=C2=A0 I re=
member reading one program recently (written in VBA without the =E2=80=98Op=
tion Explicit=E2=80=99), and although variables were (sometimes) declared, =
there were occasions where there was a typo=C2=A0in the variable name (eith=
er in the declaration, or elsewhere), and so the compiler thought=C2=A0that=
 different variables were intended.</div></div><div dir=3D"ltr"><div>=C2=A0=
</div><blockquote style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border=
-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"=
 class=3D"gmail_quote"><div dir=3D"ltr"><u>but</u> ;) when there is const I=
 think auto is redundant.<br></div></blockquote></div><div dir=3D"ltr"><div=
>I can see no advantage in eliding =E2=80=98auto=E2=80=99, except as alread=
y been mentioned, to save a few keystrokes.=C2=A0</div></div><div dir=3D"lt=
r"><blockquote style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-le=
ft-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" cl=
ass=3D"gmail_quote"><div dir=3D"ltr">=C2=A0</div></blockquote><blockquote s=
tyle=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204=
,204,204);border-left-width:1px;border-left-style:solid" class=3D"gmail_quo=
te"><div dir=3D"ltr">so why not allow this:<br><br>const /*auto*/ x=3D1701;=
<br>const/*auto*/&amp;=C2=A0 y =3D my_vec[74656];<br>const /*auto*/* const =
cpci=3D new int{47};<br>const /*auto* */ pci =3D new int{2371};<br>// no ve=
rsion for : auto* const<br><br></div></blockquote></div><div dir=3D"ltr"><d=
iv>Hmm, is the fourth example correct?=C2=A0 Should</div><div>=C2=A0</div><=
div>const pci =3D new =E2=80=A6 // Note, no=C2=A0indication that it is a po=
inter in the declaration</div><div>=C2=A0</div><div>be semantically correct=
?=C2=A0</div></div><div dir=3D"ltr"><div>=C2=A0</div><blockquote style=3D"m=
argin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204)=
;border-left-width:1px;border-left-style:solid" class=3D"gmail_quote"><div =
dir=3D"ltr">also in lambdas<br>std::sort(a.begin(),a.end(),[<u></u>const&am=
p; l, const&amp; r]{return l.size()&lt;r.size();});<br></div></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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</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 />

--001a113fbe2ead5f7905080e2eed--

.


Author: Tony V E <tvaneerd@gmail.com>
Date: Mon, 17 Nov 2014 11:19:41 -0500
Raw View
--089e0158ad58873480050810589a
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On Mon, Nov 17, 2014 at 6:27 AM, Douglas Boffey <douglas.boffey@gmail.com>
wrote:

>
> On Sunday, 16 November 2014 04:37:46 UTC, nx02co...@gmail.com wrote:
>>
>> I am not one of the people that would like to remove auto altogether
>> since it would make it unclear when there is assignment or initializatio=
n.
>>
>> Definitely agree, but for a different reason:
>
> I find languages with implicit declarations problematic.  I remember
> reading one program recently (written in VBA without the =E2=80=98Option
> Explicit=E2=80=99), and although variables were (sometimes) declared, the=
re were
> occasions where there was a typo in the variable name (either in the
> declaration, or elsewhere), and so the compiler thought that different
> variables were intended.
>
>
>> *but* ;) when there is const I think auto is redundant.
>>
> I can see no advantage in eliding =E2=80=98auto=E2=80=99, except as alrea=
dy been
> mentioned, to save a few keystrokes.
>
>>
>>
> so why not allow this:
>>
>> const /*auto*/ x=3D1701;
>> const/*auto*/&  y =3D my_vec[74656];
>> const /*auto*/* const cpci=3D new int{47};
>> const /*auto* */ pci =3D new int{2371};
>> // no version for : auto* const
>>
>> Hmm, is the fourth example correct?  Should
>
> const pci =3D new =E2=80=A6 // Note, no indication that it is a pointer i=
n the
> declaration
>
> be semantically correct?
>
>
>> also in lambdas
>> std::sort(a.begin(),a.end(),[const& l, const& r]{return
>> l.size()<r.size();});
>>
>

I think the pointer cases would be either ambiguous or misleading:

    const ptr =3D new...

is the ptr const, or does it point to const data?
Based on the placement of the comment

    const /* auto * */ pci =3D  ...

it seems the idea is for the data to be const.  But based on

    const /* auto */ x =3D 1701;

The general rule would be that the type is determined, then the variable is
const.

Or the rule is more complicated than first appears.

Just another reason to dislike the idea.  But I dislike auto in general.
(I'm waiting for when I can use Concepts in place of auto - because
although I don't care about the exact type, the code that follows that uses
the variable does place some assumptions on its type - ie it must model
some concept.)

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.
> Visit this group at
> http://groups.google.com/a/isocpp.org/group/std-proposals/.
>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--089e0158ad58873480050810589a
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 Mon, Nov 17, 2014 at 6:27 AM, Douglas Boffey <span dir=3D"ltr">&lt;<=
a href=3D"mailto:douglas.boffey@gmail.com" target=3D"_blank">douglas.boffey=
@gmail.com</a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr"><span class=3D""><br>On Sunday, 16 November 2014 04:37:46 UTC, <a =
href=3D"mailto:nx02co...@gmail.com" target=3D"_blank">nx02co...@gmail.com</=
a>  wrote:<blockquote style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;bo=
rder-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:so=
lid" class=3D"gmail_quote"><div dir=3D"ltr">I am not one of the people that=
 would like to remove auto altogether since it would make it unclear when t=
here is assignment or initialization. <br><br></div></blockquote></span><di=
v>Definitely agree, but for=C2=A0a different reason:</div><div>=C2=A0</div>=
<div>I find languages with=C2=A0implicit declarations=C2=A0problematic.=C2=
=A0 I remember reading one program recently (written in VBA without the =E2=
=80=98Option Explicit=E2=80=99), and although variables were (sometimes) de=
clared, there were occasions where there was a typo=C2=A0in the variable na=
me (either in the declaration, or elsewhere), and so the compiler thought=
=C2=A0that different variables were intended.</div><span class=3D""><div>=
=C2=A0</div><blockquote style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;=
border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:=
solid" class=3D"gmail_quote"><div dir=3D"ltr"><u>but</u> ;) when there is c=
onst I think auto is redundant.<br></div></blockquote></span><div>I can see=
 no advantage in eliding =E2=80=98auto=E2=80=99, except as already been men=
tioned, to save a few keystrokes.=C2=A0</div><span class=3D""><blockquote s=
tyle=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204=
,204,204);border-left-width:1px;border-left-style:solid" class=3D"gmail_quo=
te"><div dir=3D"ltr">=C2=A0</div></blockquote><blockquote style=3D"margin:0=
px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border=
-left-width:1px;border-left-style:solid" class=3D"gmail_quote"><div dir=3D"=
ltr">so why not allow this:<br><br>const /*auto*/ x=3D1701;<br>const/*auto*=
/&amp;=C2=A0 y =3D my_vec[74656];<br>const /*auto*/* const cpci=3D new int{=
47};<br>const /*auto* */ pci =3D new int{2371};<br>// no version for : auto=
* const<br><br></div></blockquote></span><div>Hmm, is the fourth example co=
rrect?=C2=A0 Should</div><div>=C2=A0</div><div>const pci =3D new =E2=80=A6 =
// Note, no=C2=A0indication that it is a pointer in the declaration</div><d=
iv>=C2=A0</div><div>be semantically correct?=C2=A0</div><span class=3D""><d=
iv>=C2=A0</div><blockquote style=3D"margin:0px 0px 0px 0.8ex;padding-left:1=
ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-sty=
le:solid" class=3D"gmail_quote"><div dir=3D"ltr">also in lambdas<br>std::so=
rt(a.begin(),a.end(),[<u></u>const&amp; l, const&amp; r]{return l.size()&lt=
;r.size();});<br></div></blockquote></span></div></blockquote><div><br><br>=
</div><div>I think the pointer cases would be either ambiguous or misleadin=
g:<br><br></div><div>=C2=A0=C2=A0=C2=A0 const ptr =3D new...<br><br></div><=
div>is the ptr const, or does it point to const data?<br></div><div>Based o=
n the placement of the comment<br><br>=C2=A0=C2=A0=C2=A0 const /* auto * */=
 pci =3D=C2=A0 ...<br><br></div><div>it seems the idea is for the data to b=
e const.=C2=A0 But based on<br><br>=C2=A0=C2=A0=C2=A0 const /* auto */ x =
=3D 1701;<br><br>The general rule would be that the type is determined, the=
n the variable is const.<br><br></div><div>Or the rule is more complicated =
than first appears.<br><br></div><div>Just another reason to dislike the id=
ea.=C2=A0 But I dislike auto in general. (I&#39;m waiting for when I can us=
e Concepts in place of auto - because although I don&#39;t care about the e=
xact type, the code that follows that uses the variable does place some ass=
umptions on its type - ie it must model some concept.)<br><br></div><div>To=
ny<br><br></div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8e=
x;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><span class=
=3D""><blockquote style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border=
-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"=
 class=3D"gmail_quote"><div dir=3D"ltr"></div></blockquote></span></div><di=
v class=3D"HOEnZb"><div class=3D"h5">

<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</div></div></blockquote></div><br></div></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 />

--089e0158ad58873480050810589a--

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Mon, 17 Nov 2014 17:32:23 +0100
Raw View
--001a11c23948f8698205081085af
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

well i was not ammused  that somebody doesnt use const so he tells me that
my idea is bad... i mean it may be stupid dumbest idea ever... but not
because somebody doesnt use const...   and for 5 keystrokes... i think you
underestimate how ppl dislike typing and also idea is that like auto it
remoces amount of boilerplate so really important stuff like var name and
value stand out...
On 17 Nov 2014 14:44, "David Rodr=C3=ADguez Ibeas" <dibeas@ieee.org> wrote:

> @Ivan Matek: Yes there are good uses of auto for local variables, I do
> this my self, but Yes, you could have addressed this in a more productive
> way:
>
> ... the use of 'const' in local variables is part of building a
> const-correct program, it is telling the compiler that if an attempt to
> change this local variable by mistake (either directly or through a membe=
r
> function) is done, this is unintentional and should be flagged.
>
> I find the above statement more productive for the overall discussion tha=
n
> "if you are a bad programmer" --He might be a great programmer that does
> not use the tools to its full extent, who knows?
>
> On dropping the need for 'auto', I think there is mostly consensus that
> the advantage is just to remove a couple of keystrokes and it could
> potentially complicate the language (more exceptions to be taught...). I
> don't think it will be as confusing as the VB case stated above ('const'
> cannot appear outside of a declaration), but I don't see the removal of 5
> keystrokes (including the space) worth even the discussion.
>
>     David
>
> On Mon Nov 17 2014 at 6:27:14 AM Douglas Boffey <douglas.boffey@gmail.com=
>
> wrote:
>
>>
>> On Sunday, 16 November 2014 04:37:46 UTC, nx02co...@gmail.com wrote:
>>>
>>> I am not one of the people that would like to remove auto altogether
>>> since it would make it unclear when there is assignment or initializati=
on.
>>>
>>> Definitely agree, but for a different reason:
>>
>> I find languages with implicit declarations problematic.  I remember
>> reading one program recently (written in VBA without the 'Option
>> Explicit'), and although variables were (sometimes) declared, there were
>> occasions where there was a typo in the variable name (either in the
>> declaration, or elsewhere), and so the compiler thought that different
>> variables were intended.
>>
>>
>>> *but* ;) when there is const I think auto is redundant.
>>>
>> I can see no advantage in eliding 'auto', except as already been
>> mentioned, to save a few keystrokes.
>>
>>>
>>>
>> so why not allow this:
>>>
>>> const /*auto*/ x=3D1701;
>>> const/*auto*/&  y =3D my_vec[74656];
>>> const /*auto*/* const cpci=3D new int{47};
>>> const /*auto* */ pci =3D new int{2371};
>>> // no version for : auto* const
>>>
>>> Hmm, is the fourth example correct?  Should
>>
>> const pci =3D new ... // Note, no indication that it is a pointer in the
>> declaration
>>
>> be semantically correct?
>>
>>
>>> also in lambdas
>>> std::sort(a.begin(),a.end(),[const& l, const& r]{return
>>> l.size()<r.size();});
>>>
>>  --
>>
>> ---
>> You received this message because you are subscribed to the Google Group=
s
>> "ISO C++ Standard - Future Proposals" group.
>> To unsubscribe from this group and stop receiving emails from it, send a=
n
>> 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 a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/=
unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/.
>

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

--001a11c23948f8698205081085af
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">well i was not ammused&nbsp; that somebody doesnt use const =
so he tells me that my idea is bad... i mean it may be stupid dumbest idea =
ever... but not because somebody doesnt use const...&nbsp;&nbsp; and for 5 =
keystrokes... i think you underestimate how ppl dislike typing and also ide=
a is that like auto it remoces amount of boilerplate so really important st=
uff like var name and value stand out...</p>
<div class=3D"gmail_quote">On 17 Nov 2014 14:44, &quot;David Rodr=C3=ADguez=
 Ibeas&quot; &lt;<a href=3D"mailto:dibeas@ieee.org">dibeas@ieee.org</a>&gt;=
 wrote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"=
margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">@Ivan Matek:=
 Yes there are good uses of auto for local variables, I do this my self, bu=
t Yes, you could have addressed this in a more productive way:<br><br>... t=
he use of &#39;const&#39; in local variables is part of building a const-co=
rrect program, it is telling the compiler that if an attempt to change this=
 local variable by mistake (either directly or through a member function) i=
s done, this is unintentional and should be flagged.<br><br>I find the abov=
e statement more productive for the overall discussion than &quot;if you ar=
e a bad programmer&quot; --He might be a great programmer that does not use=
 the tools to its full extent, who knows?<br><br>On dropping the need for &=
#39;auto&#39;, I think there is mostly consensus that the advantage is just=
 to remove a couple of keystrokes and it could potentially complicate the l=
anguage (more exceptions to be taught...). I don&#39;t think it will be as =
confusing as the VB case stated above (&#39;const&#39; cannot appear outsid=
e of a declaration), but I don&#39;t see the removal of 5 keystrokes (inclu=
ding the space) worth even the discussion.<br><br>&nbsp; &nbsp; David<br><b=
r><div class=3D"gmail_quote">On Mon Nov 17 2014 at 6:27:14 AM Douglas Boffe=
y &lt;<a href=3D"mailto:douglas.boffey@gmail.com" target=3D"_blank">douglas=
..boffey@gmail.com</a>&gt; wrote:<br><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr"><br>On Sunday, 16 November 2014 04:37:46 UTC, <a href=3D"mailto:nx=
02co...@gmail.com" target=3D"_blank">nx02co...@gmail.com</a>  wrote:<blockq=
uote style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:r=
gb(204,204,204);border-left-width:1px;border-left-style:solid" class=3D"gma=
il_quote"><div dir=3D"ltr">I am not one of the people that would like to re=
move auto altogether since it would make it unclear when there is assignmen=
t or initialization. <br><br></div></blockquote></div><div dir=3D"ltr"><div=
>Definitely agree, but for&nbsp;a different reason:</div><div>&nbsp;</div><=
div>I find languages with&nbsp;implicit declarations&nbsp;problematic.&nbsp=
; I remember reading one program recently (written in VBA without the &lsqu=
o;Option Explicit&rsquo;), and although variables were (sometimes) declared=
, there were occasions where there was a typo&nbsp;in the variable name (ei=
ther in the declaration, or elsewhere), and so the compiler thought&nbsp;th=
at different variables were intended.</div></div><div dir=3D"ltr"><div>&nbs=
p;</div><blockquote style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;bord=
er-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:soli=
d" class=3D"gmail_quote"><div dir=3D"ltr"><u>but</u> ;) when there is const=
 I think auto is redundant.<br></div></blockquote></div><div dir=3D"ltr"><d=
iv>I can see no advantage in eliding &lsquo;auto&rsquo;, except as already =
been mentioned, to save a few keystrokes.&nbsp;</div></div><div dir=3D"ltr"=
><blockquote style=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left=
-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid" clas=
s=3D"gmail_quote"><div dir=3D"ltr">&nbsp;</div></blockquote><blockquote sty=
le=3D"margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,2=
04,204);border-left-width:1px;border-left-style:solid" class=3D"gmail_quote=
"><div dir=3D"ltr">so why not allow this:<br><br>const /*auto*/ x=3D1701;<b=
r>const/*auto*/&amp;&nbsp; y =3D my_vec[74656];<br>const /*auto*/* const cp=
ci=3D new int{47};<br>const /*auto* */ pci =3D new int{2371};<br>// no vers=
ion for : auto* const<br><br></div></blockquote></div><div dir=3D"ltr"><div=
>Hmm, is the fourth example correct?&nbsp; Should</div><div>&nbsp;</div><di=
v>const pci =3D new &hellip; // Note, no&nbsp;indication that it is a point=
er in the declaration</div><div>&nbsp;</div><div>be semantically correct?&n=
bsp;</div></div><div dir=3D"ltr"><div>&nbsp;</div><blockquote style=3D"marg=
in:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);bo=
rder-left-width:1px;border-left-style:solid" class=3D"gmail_quote"><div dir=
=3D"ltr">also in lambdas<br>std::sort(a.begin(),a.end(),[<u></u>const&amp; =
l, const&amp; r]{return l.size()&lt;r.size();});<br></div></blockquote></di=
v>

<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" target=3D"_=
blank">std-proposals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</blockquote></div>

<p></p>

-- <br>
<br>
--- <br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals+unsubscribe@isocpp.org" target=3D"_blank">std-prop=
osals+unsubscribe@isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org" target=3D"_blank">std-proposals@isocpp.org</a>.<br>
Visit this group at <a href=3D"http://groups.google.com/a/isocpp.org/group/=
std-proposals/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</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 />

--001a11c23948f8698205081085af--

.


Author: Zhihao Yuan <zy@miator.net>
Date: Mon, 17 Nov 2014 11:34:02 -0500
Raw View
On Mon, Nov 17, 2014 at 8:44 AM, David Rodr=C3=ADguez Ibeas <dibeas@ieee.or=
g> wrote:
> ... the use of 'const' in local variables is part of building a
> const-correct program, it is telling the compiler that if an attempt to
> change this local variable by mistake (either directly or through a membe=
r
> function) is done, this is unintentional and should be flagged.
>

(Wish people don't complain me about out-of-topic. )
(I guess we've finished with the original topic? )

That's an accurate summery.  But I assume one can also
defend the use of `register` keyword in C:

.... is a part of building an efficient program, it is telling the
compiler that if an attempt to take the address of this local
variable by mistake, this is unintentional and ...

And I can also argue the use of `const` using the same logic:

When a local variable is close to its end-of-lifetime, a
programmer may want to move it into the last operation, while
the `const` qualifier accidentally turns the move into a copy.

"We need a move-only move. "
"But you still need a non-const object to move, but one can
accidentally move an object in a nested scope, and leave
the rest of the program undefined behavior..."

This sort of debates never ends.  Where is the problem?
Why that much "accidents"?  Aren't a function is the minimal
logic entity in our abstraction?

Yes, there are functions of pages long, maintained by many
different people, and you really need some "safe guard"
features, but the fact that these features exist is not an
excuse to build such a fat abstraction.  I try to write small
functions, and try to refactor big functions into small ones,
so that I don't need these features when implementing
that abstraction.

--=20
Zhihao Yuan, ID lichray
The best way to predict the future is to invent it.
___________________________________________________
4BSD -- http://bit.ly/blog4bsd

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.


Author: Thiago Macieira <thiago@macieira.org>
Date: Mon, 17 Nov 2014 09:09:04 -0800
Raw View
On Monday 17 November 2014 03:27:13 Douglas Boffey wrote:
> > const /*auto* */ pci =3D new int{2371};
> > // no version for : auto* const
> >=20
> > Hmm, is the fourth example correct?  Should
>=20
> =20
> const pci =3D new =E2=80=A6 // Note, no indication that it is a pointer i=
n the=20
> declaration
> =20
> be semantically correct?=20

I'd say it's semantically correct but does not mean what the comment implie=
d.

 const pci =3D new int{2371};

would be the same as=20

 const auto pci =3D new int{2371};

Which implies the type deduction is int *const. The comments are wrong.

--=20
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

--=20

---=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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.

.


Author: Ivan Matek <nx02columbia@gmail.com>
Date: Mon, 17 Nov 2014 18:18:59 +0100
Raw View
--001a11c23948a30c350508112c12
Content-Type: text/plain; charset=UTF-8

like i said before i messed up when adding comment... pointers get to keep
*.  so:   const * pci= new int{74656}.
you can also have const * const cpci... that is const ptr to const int
On 17 Nov 2014 18:09, "Thiago Macieira" <thiago@macieira.org> wrote:

> On Monday 17 November 2014 03:27:13 Douglas Boffey wrote:
> > > const /*auto* */ pci = new int{2371};
> > > // no version for : auto* const
> > >
> > > Hmm, is the fourth example correct?  Should
> >
> >
> > const pci = new ... // Note, no indication that it is a pointer in the
> > declaration
> >
> > be semantically correct?
>
> I'd say it's semantically correct but does not mean what the comment
> implied.
>
>         const pci = new int{2371};
>
> would be the same as
>
>         const auto pci = new int{2371};
>
> Which implies the type deduction is int *const. The comments are wrong.
>
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>    Software Architect - Intel Open Source Technology Center
>       PGP/GPG: 0x6EF45358; fingerprint:
>       E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
> --
>
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "ISO C++ Standard - Future Proposals" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe
> .
> To unsubscribe from this group and all its topics, 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/.

--001a11c23948a30c350508112c12
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<p dir=3D"ltr">like i said before i messed up when adding comment... pointe=
rs get to keep *.&nbsp; so:&nbsp;&nbsp; const * pci=3D new int{74656}.<br>
you can also have const * const cpci... that is const ptr to const int</p>
<div class=3D"gmail_quote">On 17 Nov 2014 18:09, &quot;Thiago Macieira&quot=
; &lt;<a href=3D"mailto:thiago@macieira.org">thiago@macieira.org</a>&gt; wr=
ote:<br type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Monday 17 No=
vember 2014 03:27:13 Douglas Boffey wrote:<br>
&gt; &gt; const /*auto* */ pci =3D new int{2371};<br>
&gt; &gt; // no version for : auto* const<br>
&gt; &gt;<br>
&gt; &gt; Hmm, is the fourth example correct?&nbsp; Should<br>
&gt;<br>
&gt;<br>
&gt; const pci =3D new &hellip; // Note, no indication that it is a pointer=
 in the<br>
&gt; declaration<br>
&gt;<br>
&gt; be semantically correct?<br>
<br>
I&#39;d say it&#39;s semantically correct but does not mean what the commen=
t implied.<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; const pci =3D new int{2371};<br>
<br>
would be the same as<br>
<br>
&nbsp; &nbsp; &nbsp; &nbsp; const auto pci =3D new int{2371};<br>
<br>
Which implies the type deduction is int *const. The comments are wrong.<br>
<br>
--<br>
Thiago Macieira - thiago (AT) <a href=3D"http://macieira.info" target=3D"_b=
lank">macieira.info</a> - thiago (AT) <a href=3D"http://kde.org" target=3D"=
_blank">kde.org</a><br>
&nbsp; &nbsp;Software Architect - Intel Open Source Technology Center<br>
&nbsp; &nbsp; &nbsp; PGP/GPG: 0x6EF45358; fingerprint:<br>
&nbsp; &nbsp; &nbsp; E067 918B B660 DBD1 105C&nbsp; 966C 33F5 F005 6EF4 535=
8<br>
<br>
--<br>
<br>
---<br>
You received this message because you are subscribed to a topic in the Goog=
le Groups &quot;ISO C++ Standard - Future Proposals&quot; group.<br>
To unsubscribe from this topic, visit <a href=3D"https://groups.google.com/=
a/isocpp.org/d/topic/std-proposals/vYffElZUQxo/unsubscribe" target=3D"_blan=
k">https://groups.google.com/a/isocpp.org/d/topic/std-proposals/vYffElZUQxo=
/unsubscribe</a>.<br>
To unsubscribe from this group and all its topics, send an email to <a href=
=3D"mailto:std-proposals%2Bunsubscribe@isocpp.org">std-proposals+unsubscrib=
e@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/" target=3D"_blank">http://groups.google.com/a/isocpp.org/gro=
up/std-proposals/</a>.<br>
</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 />

--001a11c23948a30c350508112c12--

.