220 6247 <522b4794.4488440a.6ec0.ffffdbe9@mx.google.com> article
Path: news.gmane.org!not-for-mail
From: "=?utf-8?B?YmlsbHkub25lYWxAZ21haWwuY29t?=" <billy.oneal@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Specialization of std::stack for std::forward_list
Date: Sat, 07 Sep 2013 08:34:43 -0700
Lines: 273
Approved: news@gmane.org
Message-ID: <522b4794.4488440a.6ec0.ffffdbe9@mx.google.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_Part_0_1378568083561"
X-Trace: ger.gmane.org 1378568084 3291 80.91.229.3 (7 Sep 2013 15:34:44 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Sat, 7 Sep 2013 15:34:44 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBDKLBLVE6ADBBFMPVWIQKGQEZK3UKDQ@isocpp.org Sat Sep 07 17:34:47 2013
Return-path: <std-proposals+bncBDKLBLVE6ADBBFMPVWIQKGQEZK3UKDQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-ie0-f199.google.com ([209.85.223.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBDKLBLVE6ADBBFMPVWIQKGQEZK3UKDQ@isocpp.org>)
	id 1VIKX9-0005xz-1Z
	for gclcip-std-proposals@m.gmane.org; Sat, 07 Sep 2013 17:34:47 +0200
Original-Received: by mail-ie0-f199.google.com with SMTP id 9sf15618129iec.2
        for <gclcip-std-proposals@m.gmane.org>; Sat, 07 Sep 2013 08:34:45 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=message-id:to:from:subject:date:mime-version: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=yylvhobsP4JqF0skdfIKiKP/OLE48sz0NuzQxELUXuY=;
        b=CJqaQUWY7lby6WCaPB90nZ+iMbD3hov3+pLbyd2JilohmJZygZw0TEZGmtWlqHKWdf
         Le1uMl9FF5czlh1kijM+nmbEaJ5wod+IJEUHPcz4PWlHLtmC9WtZLx9+DZEu5ZjG1udW
         er8bxeUrjL9mKpyVCcZD+k5rsDH1XQ6kc+1lNtmLjfjqN+BhODX0vjqq5X15xGeWwQpU
         bsTHfuSbpskgViLTJx/9cgBOcWlXGrgBi+T61VreuVhQmx5WN7g29djVAZLLXjlcuyhY
         JFhvSvWdcM21bYoL/qCJ01B8J7SNLikpiRfKXqRx/Dv5hbS97yM3LzEdGB0x5nScVV2R
         FtxA==
X-Received: by 10.50.70.106 with SMTP id l10mr2133558igu.5.1378568085875;
        Sat, 07 Sep 2013 08:34:45 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.50.122.74 with SMTP id lq10ls1109025igb.36.canary; Sat, 07 Sep
 2013 08:34:45 -0700 (PDT)
X-Received: by 10.68.197.104 with SMTP id it8mr9050036pbc.17.1378568085166;
        Sat, 07 Sep 2013 08:34:45 -0700 (PDT)
Original-Received: from mail-pa0-x233.google.com (mail-pa0-x233.google.com [2607:f8b0:400e:c03::233])
        by mx.google.com with ESMTPS id ql10si3295936pbb.130.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 07 Sep 2013 08:34:45 -0700 (PDT)
Received-SPF: pass (google.com: domain of billy.oneal@gmail.com designates 2607:f8b0:400e:c03::233 as permitted sender) client-ip=2607:f8b0:400e:c03::233;
Original-Received: by mail-pa0-f51.google.com with SMTP id lf1so4568619pab.10
        for <std-proposals@isocpp.org>; Sat, 07 Sep 2013 08:34:45 -0700 (PDT)
X-Received: by 10.68.115.15 with SMTP id jk15mr9222770pbb.36.1378568085045;
        Sat, 07 Sep 2013 08:34:45 -0700 (PDT)
Original-Received: from [192.168.1.2] ([50.46.149.27])
        by mx.google.com with ESMTPSA id py4sm4820012pbb.33.1969.12.31.16.00.00
        (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 07 Sep 2013 08:34:44 -0700 (PDT)
X-Original-Sender: billy.oneal@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of billy.oneal@gmail.com designates 2607:f8b0:400e:c03::233 as
 permitted sender) smtp.mail=billy.oneal@gmail.com;       dkim=pass
 header.i=@gmail.com;       dmarc=pass (p=NONE dis=NONE) d=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: <http://groups.google.com/a/isocpp.org/group/std-proposals/subscribe>,
 <mailto:googlegroups-manage+399137483710+unsubscribe@googlegroups.com>
Xref: news.gmane.org gmane.comp.lang.c++.isocpp.proposals:6247
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6247>

------=_Part_0_1378568083561
Content-Type: text/plain; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Friend functions are part of the class  External code cannot add friends  E=
xternal code can add derived classes.

Sent from a touchscreen. Please excuse the brevity and tpyos.

----- Reply message -----
From: "Vlad from Moscow" <vlad.moscow@mail.ru>
To: <std-proposals@isocpp.org>
Subject: [std-proposals] Specialization of std::stack for std::forward_list
Date: Sat, Sep 7, 2013 8:25 AM

Protected members servers that to share the realization (not the interface)=
 with its derived classes. If two classes share the common realization of c=
ourse they depend on each other. However objects of derived classes are in =
general objects of base classes. So there is nothing common with interface.=
 There is common realization.

Wiyth same effect you could say that private members are also an interface =
because friend functions depend on private members of the befriended class.=
 :)]

It is totally wrong approach.

=D3=D5=C2=C2=CF=D4=C1, 7 =D3=C5=CE=D4=D1=C2=D2=D1 2013 =C7., 18:51:44 UTC+4=
 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 Billy O'Neal =CE=C1=D0=C9=D3=C1=CC:
No, because x is private.

If it is possible for code external to the class to depend on some behavior=
 or member of a class, than that behavior or member is part of the interfac=
e of that class. (e.g. something like "push_back increases size by 1" is pa=
rt of vector's interface, even though there is no way to express that const=
raint in the language)

External code can rely on the protected container c by deriving from stack.=
 Therefore, it is part of the interface. External code can not depend on th=
e member x in your example, because it is private. Therefore it is not part=
 of the interface.

Sent from a touchscreen. Please excuse the brevity and tpyos.

----- Reply message -----
From: "Vlad from Moscow" <vlad....@mail.ru>
To: <std-pr...@isocpp.org>
Subject: [std-proposals] Specialization of std::stack for std::forward_list
Date: Sat, Sep 7, 2013 7:28 AM

I even could write a more simple example.to demonstrate your wrong conclusi=
ons. For example

class A
{
private:=20
int x;
public:
A( int i =3D 0 ) : x( i ) {}
int get() const { return x; }
};

Does it mean that if function get() uses private member x that x is the int=
erface of the class?!



=D3=D5=C2=C2=CF=D4=C1, 7 =D3=C5=CE=D4=D1=C2=D2=D1 2013 =C7., 18:09:12 UTC+4=
 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 Patrick M. Niedzielski =CE=C1=D0=C9=
=D3=C1=CC:
On sab, 2013-09-07 at 07:07 -0700, Vlad from Moscow wrote:

> Again you are mistaken. The client code knows nothing about protected=20

> members of your class. It relies only on the interface you provided. You=
=20

> confuse the realization with the interface.=20



I'm sorry, I don't see how I haven't shown that the client code

SneakyFoo that a user of my library would write knows nothing about

Foo's protected member, especially since it uses the member.



I don't wish to continue this discussion any further, as you don't seem

to be addressing or trying to understand my points, and instead are just

claiming that I'm wrong without giving any reasoning.



Best,

Patrick






--=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-proposal...@isocpp.org.

To post to this group, send email to std-pr...@isocpp.org.

Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposa=
ls/.






--=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/.

--=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_0_1378568083561
Content-Type: text/html; charset=KOI8-R
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<div style=3D"font-size: 12pt; font-family: Calibri,sans-serif;"><div>Frien=
d functions are part of the class &nbsp;External code cannot add friends &n=
bsp;External code can add derived classes.</div><div><br></div><div>Sent fr=
om a touchscreen. Please excuse the brevity and tpyos.</div><br><div id=3D"=
htc_header">----- Reply message -----<br>From: &quot;Vlad from Moscow&quot;=
 &lt;vlad.moscow@mail.ru&gt;<br>To: &lt;std-proposals@isocpp.org&gt;<br>Sub=
ject: [std-proposals] Specialization of std::stack for std::forward_list<br=
>Date: Sat, Sep 7, 2013 8:25 AM</div></div><br><div dir=3D"ltr"><div>Protec=
ted members servers that to share the realization (not the interface) with =
its derived classes. If two classes share the common realization of course =
they depend on each other. However objects of derived classes are in genera=
l objects of base classes. So there is nothing common with interface. There=
 is common realization.</div><div>&nbsp;</div><div>Wiyth same effect you co=
uld say that private members are also an interface because friend functions=
 depend on private members of the befriended class. :)]</div><div>&nbsp;</d=
iv><div>It is totally wrong approach.</div><div><br>=D3=D5=C2=C2=CF=D4=C1, =
7 =D3=C5=CE=D4=D1=C2=D2=D1 2013&nbsp;=C7., 18:51:44 UTC+4 =D0=CF=CC=D8=DA=
=CF=D7=C1=D4=C5=CC=D8 Billy O'Neal =CE=C1=D0=C9=D3=C1=CC:</div><blockquote =
class=3D"gmail_quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex=
; border-left-color: rgb(204, 204, 204); border-left-width: 1px; border-lef=
t-style: solid;"><div style=3D"font-family: Calibri,sans-serif; font-size: =
12pt;"><div>No, because x is private.</div><div><br></div><div>If it is pos=
sible for code external to the class to depend on some behavior or member o=
f a class, than that behavior or member is part of the interface of that cl=
ass. (e.g. something like "push_back increases size by 1" is part of vector=
's interface, even though there is no way to express that constraint in the=
 language)</div><div><br></div><div>External code can rely on the protected=
 container c by deriving from stack. Therefore, it is part of the interface=
.. External code can not depend on the member x in your example, because it =
is private. Therefore it is not part of the interface.</div><div><br></div>=
<div>Sent from a touchscreen. Please excuse the brevity and tpyos.</div><br=
><div>----- Reply message -----<br>From: "Vlad from Moscow" &lt;<a href=3D"=
javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"B_JaIqSu1l0J">vlad.=
....@mail.ru</a>&gt;<br>To: &lt;<a href=3D"javascript:" target=3D"_blank" gd=
f-obfuscated-mailto=3D"B_JaIqSu1l0J">std-pr...@isocpp.org</a>&gt;<br>Subjec=
t: [std-proposals] Specialization of std::stack for std::forward_list<br>Da=
te: Sat, Sep 7, 2013 7:28 AM</div></div><br><div dir=3D"ltr"><div>I even&nb=
sp;could write a more simple <a href=3D"http://example.to" target=3D"_blank=
">example.to</a> demonstrate your wrong conclusions. For example</div><div>=
&nbsp;</div><div>class A</div><div>{</div><div>private: </div><div>&nbsp;&n=
bsp; int x;</div><div>public:</div><div>&nbsp;&nbsp; A( int i =3D 0 ) : x( =
i ) {}</div><div>&nbsp;&nbsp; int get() const { return x; }</div><div>};</d=
iv><div>&nbsp;</div><div>Does it mean that if function get() uses private m=
ember x that x is the interface of the class?!</div><div>&nbsp;&nbsp; </div=
><div>&nbsp;</div><div><br>=D3=D5=C2=C2=CF=D4=C1, 7 =D3=C5=CE=D4=D1=C2=D2=
=D1 2013&nbsp;=C7., 18:09:12 UTC+4 =D0=CF=CC=D8=DA=CF=D7=C1=D4=C5=CC=D8 Pat=
rick M. Niedzielski =CE=C1=D0=C9=D3=C1=CC:</div><blockquote class=3D"gmail_=
quote" style=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-c=
olor: rgb(204, 204, 204); border-left-width: 1px; border-left-style: solid;=
">On sab, 2013-09-07 at 07:07 -0700, Vlad from Moscow wrote:
<br>&gt; Again you are mistaken. The client code knows nothing about protec=
ted=20
<br>&gt; members of your class. It relies only on the interface you provide=
d. You=20
<br>&gt; confuse the realization with the interface.=20
<br>
<br>I'm sorry, I don't see how I haven't shown that the client code
<br>SneakyFoo that a user of my library would write knows nothing about
<br>Foo's protected member, especially since it uses the member.
<br>
<br>I don't wish to continue this discussion any further, as you don't seem
<br>to be addressing or trying to understand my points, and instead are jus=
t
<br>claiming that I'm wrong without giving any reasoning.
<br>
<br>Best,
<br>Patrick
<br></blockquote></div>

<p></p>

-- <br>
&nbsp;<br>
--- <br>
You received this message because you are subscribed to the Google Groups "=
ISO C++ Standard - Future Proposals" group.<br>
To unsubscribe from this group and stop receiving emails from it, send an e=
mail to <a href=3D"javascript:" target=3D"_blank" gdf-obfuscated-mailto=3D"=
B_JaIqSu1l0J">std-proposal...@<wbr>isocpp.org</a>.<br>
To post to this group, send email to <a href=3D"javascript:" target=3D"_bla=
nk" gdf-obfuscated-mailto=3D"B_JaIqSu1l0J">std-pr...@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/<wbr>isocpp.or=
g/group/std-<wbr>proposals/</a>.<br>
</blockquote></div>

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<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 />

<p></p>

-- <br />
&nbsp;<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 std-proposals+unsubscribe@isocpp.org.<br />
To post to this group, send email to std-proposals@isocpp.org.<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_0_1378568083561--


.
