220 12378 <CAGg_6+Nc5-zYS+1e+Ynk4bRXfD-rjN9dUN_JvS4fYnULuzd_Sw@mail.gmail.com> article
Path: news.gmane.org!not-for-mail
From: Nevin Liber <nevin@eviloverlord.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Local variables that overstay their welcome
Date: Wed, 20 Aug 2014 10:08:04 -0500
Lines: 105
Approved: news@gmane.org
Message-ID: <CAGg_6+Nc5-zYS+1e+Ynk4bRXfD-rjN9dUN_JvS4fYnULuzd_Sw@mail.gmail.com>
References: <778b6fbf-3b58-488c-9e51-32a05b95831e@isocpp.org>
 <b9004175-65ac-4a4a-847e-a474499b1e3d@isocpp.org> <e26c6071-2a98-4ca3-89d1-006e240e5a30@isocpp.org>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary=f46d044280c4e97535050110fa6a
X-Trace: ger.gmane.org 1408547334 31792 80.91.229.3 (20 Aug 2014 15:08:54 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Wed, 20 Aug 2014 15:08:54 +0000 (UTC)
To: "std-proposals@isocpp.org" <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBCE35H5S6IDBB7PT2KPQKGQEVSCWBSI@isocpp.org Wed Aug 20 17:08:47 2014
Return-path: <std-proposals+bncBCE35H5S6IDBB7PT2KPQKGQEVSCWBSI@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-we0-f199.google.com ([74.125.82.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCE35H5S6IDBB7PT2KPQKGQEVSCWBSI@isocpp.org>)
	id 1XK7VG-0006V8-5O
	for gclcip-std-proposals@m.gmane.org; Wed, 20 Aug 2014 17:08:46 +0200
Original-Received: by mail-we0-f199.google.com with SMTP id p10sf5023636wes.6
        for <gclcip-std-proposals@m.gmane.org>; Wed, 20 Aug 2014 08:08:45 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:mime-version:sender:in-reply-to:references:from
         :date:message-id:subject:to:x-original-sender
         :x-original-authentication-results:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe:content-type;
        bh=tKvHr/2zIL8YBZq2DsJuR5N1URy8z/wp1EJzvmlI8qQ=;
        b=dVCrExmp8hDHcmZPJ0pFnMvhc9dVg7pDNqOzZhP6JrMLFOAG7NNPkQXJcq1CNbNLfc
         4z/7kspPrY7wLHpnIBW8iAVOdTzwzUUu00ANKWhA5e8hnY00z1Bv4Z7t1K0C7EOqYAYL
         7qemyREZahkXdJAywxn1E4Us8iJ9gc28wgbaEJq9f6pFyzBIznXY2A8lH7PO/B/RUlIi
         ksXlwayorcc2bOcTd5yGN/hQMK7/oBHEaBabIAQjKz8lH3qDh66/Z71lG11A07nFN1Tq
         B2WA/kyUpfHqG+HiaTyMwt4s5VXb824aq4xBXoLvYHKsKaw1oiu9XJojC//7WvJNvCmT
         Z4Tw==
X-Gm-Message-State: ALoCoQmfLQd4G4A5mtQYW4pTTJrrsMnA6ySiKsFzH+YNaCUDtOX6GlByOYDRTQPuLTLLBBk1g+5r
X-Received: by 10.112.188.136 with SMTP id ga8mr382508lbc.8.1408547325827;
        Wed, 20 Aug 2014 08:08:45 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.180.208.99 with SMTP id md3ls732319wic.9.canary; Wed, 20 Aug
 2014 08:08:44 -0700 (PDT)
X-Received: by 10.180.211.233 with SMTP id nf9mr15491579wic.33.1408547324586;
        Wed, 20 Aug 2014 08:08:44 -0700 (PDT)
Original-Received: from mail-we0-x22e.google.com (mail-we0-x22e.google.com [2a00:1450:400c:c03::22e])
        by mx.google.com with ESMTPS id c5si4993008wie.66.2014.08.20.08.08.44
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Wed, 20 Aug 2014 08:08:44 -0700 (PDT)
Received-SPF: pass (google.com: domain of nliber@gmail.com designates 2a00:1450:400c:c03::22e as permitted sender) client-ip=2a00:1450:400c:c03::22e;
Original-Received: by mail-we0-f174.google.com with SMTP id x48so8060969wes.33
        for <std-proposals@isocpp.org>; Wed, 20 Aug 2014 08:08:44 -0700 (PDT)
X-Received: by 10.180.24.225 with SMTP id x1mr15608252wif.14.1408547324255;
 Wed, 20 Aug 2014 08:08:44 -0700 (PDT)
Original-Sender: nliber@gmail.com
Original-Received: by 10.194.242.198 with HTTP; Wed, 20 Aug 2014 08:08:04 -0700 (PDT)
In-Reply-To: <e26c6071-2a98-4ca3-89d1-006e240e5a30@isocpp.org>
X-Original-Sender: nevin@eviloverlord.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of nliber@gmail.com designates 2a00:1450:400c:c03::22e as permitted
 sender) smtp.mail=nliber@gmail.com;       dkim=pass header.i=@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <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:12378
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/12378>

--f46d044280c4e97535050110fa6a
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

On 20 August 2014 09:53, Matthew Fioravante <fmatthew5876@gmail.com> wrote:

> Sorry I made a typo in the first post. Lets do a full example which shoul=
d
>> illuminate
>>
>
> int i;
>
> struct F {
>   int i;
>   void f() {
>      int i;
>      a(i); //uses local i
>      kill i;
>      b(i); //uses data member i
>      kill i;
>      c(i); //uses global i
>      kill i;
>      d(i); //compiler error
>   }
> };
>

=E2=80=A2 If you know enough to write "kill", you know enough to avoid the =
problem
in the first place.

=E2=80=A2 This exasperates the problem of shadowing.  If people are having =
problems
with moved-from objects, why should I believe they can handle shadowing
correctly?
--=20
 Nevin ":-)" Liber  <mailto:nevin@eviloverlord.com>  (847) 691-1404

--=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/.

--f46d044280c4e97535050110fa6a
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On 20 August 2014 09:53, Matthew Fioravante <span dir=3D"l=
tr">&lt;<a href=3D"mailto:fmatthew5876@gmail.com" target=3D"_blank">fmatthe=
w5876@gmail.com</a>&gt;</span> wrote:<br><div class=3D"gmail_extra"><div cl=
ass=3D"gmail_quote">

<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex"><div><blockquote style=3D"margin:0px 0px 0px=
 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-widt=
h:1px;border-left-style:solid" class=3D"gmail_quote">

<div dir=3D"ltr"><div class=3D""><div>Sorry I made a typo=C2=A0in the first=
 post.=C2=A0Lets do a full example which should illuminate<br></div></div><=
/div></blockquote><div>=C2=A0</div><div>int i;</div><div>=C2=A0</div><div>s=
truct F {</div><div>

=C2=A0 int i;</div><div>=C2=A0 void f() {</div><div>=C2=A0=C2=A0=C2=A0=C2=
=A0 int i;</div><div>=C2=A0=C2=A0=C2=A0=C2=A0 a(i); //uses local i</div><di=
v>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0kill i;</div><div>=C2=A0=C2=A0=C2=A0=C2=A0 =
b(i); //uses data member i</div><div>=C2=A0=C2=A0=C2=A0=C2=A0 kill i;</div>=
<div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0c(i); //uses global i</div>
<div>
=C2=A0=C2=A0=C2=A0=C2=A0 kill i;</div><div>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0d(=
i); //compiler error</div><div>=C2=A0 }<br>};</div></div></blockquote><div>=
<br></div><div>=E2=80=A2 If you know enough to write &quot;kill&quot;, you =
know enough to avoid the problem in the first place.</div>

<div><br></div><div>=E2=80=A2 This exasperates the problem of shadowing. =
=C2=A0If people are having problems with moved-from objects, why should I b=
elieve they can handle shadowing correctly?</div></div>-- <br>=C2=A0Nevin &=
quot;:-)&quot; Liber=C2=A0 &lt;mailto:<a href=3D"mailto:nevin@eviloverlord.=
com" target=3D"_blank">nevin@eviloverlord.com</a>&gt;=C2=A0 (847) 691-1404
</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 />

--f46d044280c4e97535050110fa6a--

.
