220 27634 <814750ea-1ef8-4792-9b50-aec0bae4d841@isocpp.org> article
Path: news.gmane.org!.POSTED!not-for-mail
From: inkwizytoryankes@gmail.com
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: this in non-member functions
Date: Fri, 5 Aug 2016 10:17:09 -0700 (PDT)
Lines: 153
Approved: news@gmane.org
Message-ID: <814750ea-1ef8-4792-9b50-aec0bae4d841@isocpp.org>
References: <CAA7YVg3ObHqk-rfGRqgCqw3D-=u2pOwz=p8NHtC6n9tpBLq-Aw@mail.gmail.com>
 <cf5b6196-63bc-49ff-8a6a-bfdfb8a7ab0e@isocpp.org> <CAA7YVg2BQaVD2MyLyyEWuzWUnqjGrNUUi9eZwy7skjq8=ourvA@mail.gmail.com>
 <2351486.cE391vEbrj@tjmaciei-mobl1> <CACGiwhEAN4R2xE9g84xk6KKDB76+PpLFUt_Af6aKhDpAMf8Lqw@mail.gmail.com>
 <nnv12b$okq$1@blaine.gmane.org>
 <CAA7YVg3jtYJ8JdLqqvN1eGx0L21Bef2J-atc0_ufUwKxtsiVSQ@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: blaine.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_760_514272996.1470417429901"
X-Trace: blaine.gmane.org 1470417462 4415 195.159.176.226 (5 Aug 2016 17:17:42 GMT)
X-Complaints-To: usenet@blaine.gmane.org
NNTP-Posting-Date: Fri, 5 Aug 2016 17:17:42 +0000 (UTC)
To: ISO C++ Standard - Future Proposals <std-proposals@isocpp.org>
Original-X-From: std-proposals+bncBDDLTAGNTIBBBF4USO6QKGQEM6SZJOA@isocpp.org Fri Aug 05 19:17:34 2016
Return-path: <std-proposals+bncBDDLTAGNTIBBBF4USO6QKGQEM6SZJOA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-it0-f70.google.com ([209.85.214.70])
	by blaine.gmane.org with esmtp (Exim 4.84_2)
	(envelope-from <std-proposals+bncBDDLTAGNTIBBBF4USO6QKGQEM6SZJOA@isocpp.org>)
	id 1bVikD-0006Nk-Ku
	for gclcip-std-proposals@m.gmane.org; Fri, 05 Aug 2016 19:17:13 +0200
Original-Received: by mail-it0-f70.google.com with SMTP id i64sf77341615ith.2
        for <gclcip-std-proposals@m.gmane.org>; Fri, 05 Aug 2016 10:17:14 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=isocpp-org.20150623.gappssmtp.com; s=20150623;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=kJvagg0ZBHw33M5xh//FGf/iQaV6OaSCHAnTeu7Uoig=;
        b=O+p1aU4RFbKyBxCJQf+y1rAqjZyHSUlQ/s57pZ5YdOS3uYN40Pk4/4OxR1a8PZlNdM
         kl8a140w/fCRKm5gijYA+JFon+tEhJfr5Lt7Laa2Q4m0UT1WnhNdNzQXk4xTHC2WC/py
         BcpT6GfOEEkEjhccxV2liAMOFOqz/MbFtsqEuoEDvL+MqZTlhg7Qvl1a2KRjdtz92DW0
         HA5g60tU9l0KZgdB9ovZAO/AkDrt29kIeFXf1XEIXDdpOrrwuipBkQ6lIhJHH3AXHLsY
         czy38O3nTjOC/lcARxAzOuBdpvnvyDkXTT8Hy9feKzlEdZahQI2i7PnfsUFidLVgXrPz
         ddyg==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20120113;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :x-spam-checked-in-group:list-post:list-help:list-archive
         :list-subscribe:list-unsubscribe;
        bh=kJvagg0ZBHw33M5xh//FGf/iQaV6OaSCHAnTeu7Uoig=;
        b=LepTpKS3jYJKOJGUm5+WgnUgzVD/k3pBZ7KbhdvrA2PBJbJMvJx7YNhwJZJJfKwZAA
         0sGgLJdGlIYbJMVBZE2RBgAcDN8NFDLNZLCMxeJfYfBsyYW/3lEDTegI5UrYaFIsBojA
         w0wkvlf18U9JU096PMSnW2T0GE/vw8SjX1Yi7qX9kXz2RcOia2Y1pHjHtJC8eKRM7SYE
         atT+Ide4W3PlHBj5O/BMbJrQqyTHCkBH3QbOqWBpHZNc1nYGgjl/rNCqphsxj0VGqWu/
         5aTULpnmT5kAKX4kozOIbXI0gWEf571495NmGsd8LoG/GvjIYjyRiCZ0D6Dup8F1g6CO
         +O9g==
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:x-original-sender:reply-to:precedence
         :mailing-list:list-id:x-spam-checked-in-group:list-post:list-help
         :list-archive:list-subscribe:list-unsubscribe;
        bh=kJvagg0ZBHw33M5xh//FGf/iQaV6OaSCHAnTeu7Uoig=;
        b=dFexxrbG3yEK5fWVQJu1OBcNzuvDitPLeG3Xh3KZ2XVUmiIjBRAVReX56SmpXmuQzu
         9VQxTgBcNV2eeb4faH78W1cAoJC/ljFXnWRjyGIlLw6IdlN9jNzg/ziEGbigTed+Fwgx
         hoXxmOeQWokeyuVaxzz0rNDgf+0lhblB8NecbayQJE49zgEWFhuQ/VXoAevQFAsERD4h
         ZqULvTP4fdInvkdXozDR414Cki9wOSe+JrlydPGxIZKYhYv+X49K1N814kUFU91UqijO
         djc8trn/sjKrovuBMi2KpvhnpI2aHcCF2xZvGdLhxEOptzeTO2ZHYOL5kRyMtrelXg6e
         OPtg==
X-Gm-Message-State: AEkoouuznknn6GtryBuV+FcnWtoyjfCTfUB5fs0FvLe6/x40WG61G5Cv123AFBNHjtrrgQ==
X-Received: by 10.157.39.41 with SMTP id r38mr65389923ota.8.1470417433353;
        Fri, 05 Aug 2016 10:17:13 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.107.15.96 with SMTP id x93ls979166ioi.38.gmail; Fri, 05 Aug
 2016 10:17:11 -0700 (PDT)
X-Received: by 10.36.227.207 with SMTP id d198mr200303ith.4.1470417431207;
        Fri, 05 Aug 2016 10:17:11 -0700 (PDT)
In-Reply-To: <CAA7YVg3jtYJ8JdLqqvN1eGx0L21Bef2J-atc0_ufUwKxtsiVSQ@mail.gmail.com>
X-Original-Sender: inkwizytoryankes@gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Google-Group-Id: 399137483710
List-Post: <https://groups.google.com/a/isocpp.org/group/std-proposals/post>, <mailto:std-proposals@isocpp.org>
List-Help: <https://support.google.com/a/isocpp.org/bin/topic.py?topic=25838>, <mailto:std-proposals+help@isocpp.org>
List-Archive: <https://groups.google.com/a/isocpp.org/group/std-proposals/>
List-Subscribe: <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:std-proposals+subscribe@isocpp.org>
List-Unsubscribe: <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>,
 <https://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:27634
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/27634>

------=_Part_760_514272996.1470417429901
Content-Type: multipart/alternative; 
	boundary="----=_Part_761_1231646959.1470417429902"

------=_Part_761_1231646959.1470417429902
Content-Type: text/plain; charset=UTF-8



On Thursday, August 4, 2016 at 12:26:36 PM UTC+2, Viacheslav Usov wrote:
>
> On Thu, Aug 4, 2016 at 11:14 AM, Bo Persson <b...@gmb.dk <javascript:>> 
> wrote:
>
> > Yes, I would definitely be confused by the sublety of the parameter name.
>
> I hope everybody has read the original message in the thread.
>
> As a reminder, this is not only about parameters, and the public-only 
> binding was mentioned there. The confusion that can arise because of the 
> public-only binding ("first kind") and because of misspelled identifiers 
> ("second kind") is not something new that this proposal would introduce. 
> The first kind is present, for example, in this:
>
> struct A
> {
>     int x;
> private:
>     int y;
> };
>
> struct B: A
> {
>     void foo()
>     {
>         x = 1; // OK
>         y = 2; // error
>     }
> };
>
> The second kind is always just around the corner in any C++ program.
>
> int she;
> struct foo
> {
>     int he;
>     void bar() { she = 1; } // really?
> ];
>
> Cheers,
> V.
>
>

And what about templates?
template<typename T>
void f(T* this)
{
    a = 6;
};
What meaning have this code? `a` is member or global value?
Because member `a` is dependent name compiler need always ignore it and go 
for global with same name.
This made this proposition unusable in template contexts.
 

-- 
You received this message because you are subscribed to the Google Groups "ISO C++ Standard - Future Proposals" group.
To unsubscribe from this group and stop receiving emails from it, send an email to std-proposals+unsubscribe@isocpp.org.
To post to this group, send email to std-proposals@isocpp.org.
To view this discussion on the web visit https://groups.google.com/a/isocpp.org/d/msgid/std-proposals/814750ea-1ef8-4792-9b50-aec0bae4d841%40isocpp.org.

------=_Part_761_1231646959.1470417429902
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><br><br>On Thursday, August 4, 2016 at 12:26:36 PM UTC+2, =
Viacheslav Usov wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;=
margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir=
=3D"ltr"><div><div class=3D"gmail_quote">On Thu, Aug 4, 2016 at 11:14 AM, B=
o Persson <span dir=3D"ltr">&lt;<a href=3D"javascript:" target=3D"_blank" g=
df-obfuscated-mailto=3D"Tr06WUaLBwAJ" rel=3D"nofollow" onmousedown=3D"this.=
href=3D&#39;javascript:&#39;;return true;" onclick=3D"this.href=3D&#39;java=
script:&#39;;return true;">b...@gmb.dk</a>&gt;</span> wrote:</div><div clas=
s=3D"gmail_quote"><br></div><div class=3D"gmail_quote">&gt; Yes, I would de=
finitely be confused by the sublety of the parameter name.</div><div class=
=3D"gmail_quote"><div><br></div><div>I hope everybody has read the original=
 message in the thread.</div><div><br></div><div>As a reminder, this is not=
 only about parameters, and the public-only binding was mentioned there. Th=
e confusion that can arise because of the public-only binding (&quot;first =
kind&quot;) and because of misspelled identifiers (&quot;second kind&quot;)=
 is not something new that this proposal would introduce. The first kind is=
 present, for example, in this:</div><div><br></div><div>struct A</div><div=
>{</div><div>=C2=A0 =C2=A0 int x;</div><div>private:</div><div>=C2=A0 =C2=
=A0 int y;</div><div>};</div><div><br></div><div>struct B: A</div><div>{</d=
iv><div>=C2=A0 =C2=A0 void foo()</div><div>=C2=A0 =C2=A0 {</div><div>=C2=A0=
 =C2=A0 =C2=A0 =C2=A0 x =3D 1; // OK</div><div>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =
y =3D 2; // error</div><div>=C2=A0 =C2=A0 }</div><div>};</div><div><br></di=
v><div>The second kind is always just around the corner in any C++ program.=
<br></div><div><br></div><div>int she;<br></div><div>struct foo<br></div><d=
iv>{</div><div>=C2=A0 =C2=A0 int he;</div><div>=C2=A0 =C2=A0 void bar() { s=
he =3D 1; } // really?</div><div>];</div><div><br></div><div>Cheers,<br></d=
iv><div>V.</div><div><br></div></div></div></div></blockquote><div><br><br>=
And what about templates?<br><div class=3D"prettyprint" style=3D"background=
-color: rgb(250, 250, 250); border-color: rgb(187, 187, 187); border-style:=
 solid; border-width: 1px; word-wrap: break-word;"><code class=3D"prettypri=
nt"><div class=3D"subprettyprint"><span style=3D"color: #008;" class=3D"sty=
led-by-prettify">template</span><span style=3D"color: #660;" class=3D"style=
d-by-prettify">&lt;</span><span style=3D"color: #008;" class=3D"styled-by-p=
rettify">typename</span><span style=3D"color: #000;" class=3D"styled-by-pre=
ttify"> T</span><span style=3D"color: #660;" class=3D"styled-by-prettify">&=
gt;</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br></s=
pan><span style=3D"color: #008;" class=3D"styled-by-prettify">void</span><s=
pan style=3D"color: #000;" class=3D"styled-by-prettify"> f</span><span styl=
e=3D"color: #660;" class=3D"styled-by-prettify">(</span><span style=3D"colo=
r: #000;" class=3D"styled-by-prettify">T</span><span style=3D"color: #660;"=
 class=3D"styled-by-prettify">*</span><span style=3D"color: #000;" class=3D=
"styled-by-prettify"> </span><span style=3D"color: #008;" class=3D"styled-b=
y-prettify">this</span><span style=3D"color: #660;" class=3D"styled-by-pret=
tify">)</span><span style=3D"color: #000;" class=3D"styled-by-prettify"><br=
></span><span style=3D"color: #660;" class=3D"styled-by-prettify">{</span><=
span style=3D"color: #000;" class=3D"styled-by-prettify"><br>=C2=A0 =C2=A0 =
a </span><span style=3D"color: #660;" class=3D"styled-by-prettify">=3D</spa=
n><span style=3D"color: #000;" class=3D"styled-by-prettify"> </span><span s=
tyle=3D"color: #066;" class=3D"styled-by-prettify">6</span><span style=3D"c=
olor: #660;" class=3D"styled-by-prettify">;</span><span style=3D"color: #00=
0;" class=3D"styled-by-prettify"><br></span><span style=3D"color: #660;" cl=
ass=3D"styled-by-prettify">};</span><span style=3D"color: #000;" class=3D"s=
tyled-by-prettify"><br></span></div></code></div>What meaning have this cod=
e? `a` is member or global value?<br>Because member `a` is dependent name c=
ompiler need always ignore it and go for global with same name.<br>This mad=
e this proposition unusable in template contexts.<br>=C2=A0<br></div></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups &=
quot;ISO C++ Standard - Future Proposals&quot; group.<br />
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"mailto:std-proposals+unsubscribe@isocpp.org">std-proposa=
ls+unsubscribe@isocpp.org</a>.<br />
To post to this group, send email to <a href=3D"mailto:std-proposals@isocpp=
..org">std-proposals@isocpp.org</a>.<br />
To view this discussion on the web visit <a href=3D"https://groups.google.c=
om/a/isocpp.org/d/msgid/std-proposals/814750ea-1ef8-4792-9b50-aec0bae4d841%=
40isocpp.org?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.=
com/a/isocpp.org/d/msgid/std-proposals/814750ea-1ef8-4792-9b50-aec0bae4d841=
%40isocpp.org</a>.<br />

------=_Part_761_1231646959.1470417429902--

------=_Part_760_514272996.1470417429901--

.
