220 14983 <161bc7d9-02c3-4710-928f-afbe0cb7c8d9@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: german.gomez@personifyinc.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Safer C++: never allow implicitly uninitialized variables?
Date: Wed, 10 Dec 2014 18:54:23 -0800 (PST)
Lines: 122
Approved: news@gmane.org
Message-ID: <161bc7d9-02c3-4710-928f-afbe0cb7c8d9@isocpp.org>
References: <4720a9a6-24d5-4488-a229-2bdf2433fa03@isocpp.org>
 <59113276.ZOeVMUBO6m@drako>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_5192_1540542653.1418266463648"
X-Trace: ger.gmane.org 1418266474 5253 80.91.229.3 (11 Dec 2014 02:54:34 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Thu, 11 Dec 2014 02:54:34 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDWYPV7DUIFRBYEOUSSAKGQEOLJQACQ@isocpp.org Thu Dec 11 03:54:26 2014
Return-path: <std-proposals+bncBDWYPV7DUIFRBYEOUSSAKGQEOLJQACQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-pa0-f69.google.com ([209.85.220.69])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDWYPV7DUIFRBYEOUSSAKGQEOLJQACQ@isocpp.org>)
	id 1Xytta-0006Z8-2S
	for gclcip-std-proposals@m.gmane.org; Thu, 11 Dec 2014 03:54:26 +0100
Original-Received: by mail-pa0-f69.google.com with SMTP id et14sf23071269pad.8
        for <gclcip-std-proposals@m.gmane.org>; Wed, 10 Dec 2014 18:54:25 -0800 (PST)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:date:from:to:message-id:in-reply-to:references
         :subject:mime-version:content-type:x-original-sender:reply-to
         :precedence:mailing-list:list-id:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=x1cSok9p4b8O2rHyBzTErtYMxKk81nz/IUgQXuWQuvs=;
        b=gy/NvPMYXCNewzGMFsnF7enEVzc0F7A15TP9dqraZYR8UU/pfJMuXH6Q8xYaYWxJ/5
         9JbThkD0bkV+h7+XDMb4+jNZhALaS82vsaNZVrcWFS0n67LMgtx8wRq9oE5Syr8W5YQx
         GUB7HRKj7ZGS/FZp5I3V6WZT11QRQuc1SK2EqHEBoXY8kkd//TVKAUWfutQYeNPnjqP0
         l6jVtOgIEsih3sK71h0Ir+NFZV45ZDquEJXQlQeYeiY8wwBZE5qWWlaBkGf6hoMDAONj
         9LcnahYDwJ/EgD8QV7KnjshFOJHKzU6pOE8I8JXrZ21PG2/frwC6YOps8m47SIjg/qs1
         vS3A==
X-Gm-Message-State: ALoCoQnwykqg0/k9PEFXy8u8w1t3QvIv/b1FujZ5PEGpOhsKuHc+GFN/KVGWcI0srMq0opBy942n
X-Received: by 10.66.182.7 with SMTP id ea7mr6773437pac.23.1418266465171;
        Wed, 10 Dec 2014 18:54:25 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.25.135 with SMTP id c7ls752231igg.33.gmail; Wed, 10 Dec
 2014 18:54:24 -0800 (PST)
X-Received: by 10.50.110.42 with SMTP id hx10mr237251igb.16.1418266464603;
        Wed, 10 Dec 2014 18:54:24 -0800 (PST)
In-Reply-To: <59113276.ZOeVMUBO6m@drako>
X-Original-Sender: german.gomez@personifyinc.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <http://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <http://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <http://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:14983
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/14983>

------=_Part_5192_1540542653.1418266463648
Content-Type: multipart/alternative; 
	boundary="----=_Part_5193_1837520739.1418266463648"

------=_Part_5193_1837520739.1418266463648
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable



On Wednesday, December 10, 2014 6:15:15 AM UTC+7, Ivan =C4=8Cuki=C4=87 wrot=
e:
>
>
> Another work-around which is beoming more popular lately is to use auto a=
s=20
> the=20
> type specifier. In that case, you are forced to explicitely initialize th=
e=20
> variable.=20
>
> =20
 Well, it requires the use of auto. I can imagine style guides where auto=
=20
will be banned
most of the time for code clarity when reading.

This is, IMO, safer than initializing it to a compiler-chosen value (or a=
=20
> default-constructed one).=20
>

I think value-initialization should be the correct default, not a=20
compiler-chosen value.=20

> --=20
> Cheerio,=20
> Ivan=20
>
>
> KDE, ivan.cukic at kde.org, http://ivan.fomentgroup.org/=20
> gpg key id: 850B6F76, keyserver.pgp.com=20
>

--=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_5193_1837520739.1418266463648
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Wednesday, December 10, 2014 6:15:15 AM UTC+7, =
Ivan =C4=8Cuki=C4=87 wrote:<blockquote class=3D"gmail_quote" style=3D"margi=
n: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">
<br>Another work-around which is beoming more popular lately is to use auto=
 as the=20
<br>type specifier. In that case, you are forced to explicitely initialize =
the=20
<br>variable.
<br>
<br></blockquote><div>&nbsp;</div><div>&nbsp;Well, it requires the use of a=
uto. I can imagine style guides where auto will be banned</div><div>most of=
 the time for code clarity when reading.</div><div><br></div><blockquote cl=
ass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px =
#ccc solid;padding-left: 1ex;">This is, IMO, safer than initializing it to =
a compiler-chosen value (or a=20
<br>default-constructed one).
<br></blockquote><div><br></div><div>I think value-initialization should be=
 the correct default, not a compiler-chosen value.&nbsp;</div><blockquote c=
lass=3D"gmail_quote" style=3D"margin: 0;margin-left: 0.8ex;border-left: 1px=
 #ccc solid;padding-left: 1ex;">--
<br>Cheerio,
<br>Ivan
<br>
<br>
<br>KDE, ivan.cukic at <a href=3D"http://kde.org" target=3D"_blank" onmouse=
down=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fkde.org\46s=
a\75D\46sntz\0751\46usg\75AFQjCNHGRJdo5_JYG1DowztwAHAKs80XSA';return true;"=
 onclick=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fkde.org=
\46sa\75D\46sntz\0751\46usg\75AFQjCNHGRJdo5_JYG1DowztwAHAKs80XSA';return tr=
ue;">kde.org</a>, <a href=3D"http://ivan.fomentgroup.org/" target=3D"_blank=
" onmousedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%2Fiv=
an.fomentgroup.org%2F\46sa\75D\46sntz\0751\46usg\75AFQjCNEQ6zTWT5_bZqFzMEzf=
dv0KptX1WA';return true;" onclick=3D"this.href=3D'http://www.google.com/url=
?q\75http%3A%2F%2Fivan.fomentgroup.org%2F\46sa\75D\46sntz\0751\46usg\75AFQj=
CNEQ6zTWT5_bZqFzMEzfdv0KptX1WA';return true;">http://ivan.fomentgroup.org/<=
/a>
<br>gpg key id: 850B6F76, <a href=3D"http://keyserver.pgp.com" target=3D"_b=
lank" onmousedown=3D"this.href=3D'http://www.google.com/url?q\75http%3A%2F%=
2Fkeyserver.pgp.com\46sa\75D\46sntz\0751\46usg\75AFQjCNEux-nX0GwFGmasIC4KTv=
CIME1TmA';return true;" onclick=3D"this.href=3D'http://www.google.com/url?q=
\75http%3A%2F%2Fkeyserver.pgp.com\46sa\75D\46sntz\0751\46usg\75AFQjCNEux-nX=
0GwFGmasIC4KTvCIME1TmA';return true;">keyserver.pgp.com</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 />

------=_Part_5193_1837520739.1418266463648--
------=_Part_5192_1540542653.1418266463648--

.
