220 6193 <419bda08-54a2-43e7-8dd7-ade5bf47cf88@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Vlad from Moscow <vlad.moscow@mail.ru>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Specialization of std::stack for std::forward_list
Date: Fri, 6 Sep 2013 11:34:07 -0700 (PDT)
Lines: 123
Approved: news@gmane.org
Message-ID: <419bda08-54a2-43e7-8dd7-ade5bf47cf88@isocpp.org>
References: <d51e20f7-665e-49f7-a3e8-caed3660563f@isocpp.org>
 <CAGNvRgDd2KS+MVM0tXHTTO7nk=9BCEcrCdtnKweySr7b0L=bmA@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_32_7412352.1378492447354"
X-Trace: ger.gmane.org 1378492447 28015 80.91.229.3 (6 Sep 2013 18:34:07 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 6 Sep 2013 18:34:07 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCXLLRHD7IDRBIGAVCIQKGQECJXJDFQ@isocpp.org Fri Sep 06 20:34:10 2013
Return-path: <std-proposals+bncBCXLLRHD7IDRBIGAVCIQKGQECJXJDFQ@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-qe0-f71.google.com ([209.85.128.71])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBCXLLRHD7IDRBIGAVCIQKGQECJXJDFQ@isocpp.org>)
	id 1VI0rB-0002FL-8M
	for gclcip-std-proposals@m.gmane.org; Fri, 06 Sep 2013 20:34:09 +0200
Original-Received: by mail-qe0-f71.google.com with SMTP id a11sf343069qen.6
        for <gclcip-std-proposals@m.gmane.org>; Fri, 06 Sep 2013 11:34:08 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=date:from:to:message-id:in-reply-to:references:subject:mime-version
         :x-original-sender:reply-to:precedence:mailing-list:list-id
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe
         :content-type;
        bh=isHGsXlRiUGbsuoLViTP88RauBJnTZlfTZDKKltwmI8=;
        b=f/jvjMAEssM7qTOosijck063fde+WzWdsGgkL/zbcjbU4w/FImwcVhdWEsbhYdRokX
         EYGe3qy8D+PeJHMKeQ+lUzn7s5WNtIL8qasmIIPnQdQMM8vCsCQpc1ezzcGDQEOWdYP4
         stCAHbwgsI6kqgHkcNTRHy8QD2TMWUdsJqHhrOlrbkEPUI/BNQhwyosoKcK2LXmF+0lB
         gMQ7IjbXYYew7/gjBTvo+4DBKrumLBv/vhrS0Ac1P0nQicX6wVLpe/Xcaelfn3DLpJFo
         jwdipb6/x4EQYJa9KH4bXJVCc71lMBTUtG6EXmyWSpzaw3m+6rnGQ/zrrC2z78evz999
         oYtA==
X-Received: by 10.236.156.138 with SMTP id m10mr1280420yhk.26.1378492448349;
        Fri, 06 Sep 2013 11:34:08 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.49.134.74 with SMTP id pi10ls980074qeb.35.gmail; Fri, 06 Sep
 2013 11:34:07 -0700 (PDT)
X-Received: by 10.49.12.47 with SMTP id v15mr50739qeb.39.1378492447623;
        Fri, 06 Sep 2013 11:34:07 -0700 (PDT)
In-Reply-To: <CAGNvRgDd2KS+MVM0tXHTTO7nk=9BCEcrCdtnKweySr7b0L=bmA@mail.gmail.com>
X-Original-Sender: vlad.moscow@mail.ru
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:6193
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/6193>

------=_Part_32_7412352.1378492447354
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Daniel, I can not agree with you. The semantic and the interface (except=20
the member function size()) of the stack will not be changed. In fact=20
std::forward_list is the most appropriate container for using as the base=
=20
of the stack. .
=20
By the way I have not understood what is the problem with push?

=D0=BF=D1=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 6 =D1=81=D0=B5=D0=BD=D1=82=D1=
=8F=D0=B1=D1=80=D1=8F 2013 =D0=B3., 22:28:07 UTC+4 =D0=BF=D0=BE=D0=BB=D1=8C=
=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Daniel Kr=C3=BCgler=20
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:

> 2013/9/6 Vlad from Moscow <vlad....@mail.ru <javascript:>>:=20
> > I would like to propose to include specialization of std::stack for=20
> > std::forward_list.=20
> >=20
> > In fact std::forward_list has already all characteristics of a stack.=
=20
> There=20
> > will be only one difference compared with the primary class std::stack:=
=20
>  the=20
> > specialization will not contain member function size() because=20
> > std::forward_list has no such member.=20
> >=20
> > What will you say?=20
>
> After you have "eliminated" size(), how do you proceed with push()?=20
>
> I really don't like this suggestion: stack exists to present a=20
> dedicated subset of operations adapted from a container. If you=20
> specialize stack and start to remove or change the semantics of=20
> functions, this is no longer a uniform wrapper. Since you seem to be=20
> interested in a different kind of view on containers, I suggest to=20
> invent a different one and not trying to distort an apple into a=20
> coconut. std::vector<bool> has often been considered as a bad design=20
> idea, because it does not provide the *same* guarantees as any other=20
> std::vector<T>. Please lets not repeat the same kind of design error=20
> again.=20
>
> - Daniel=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_32_7412352.1378492447354
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div>Daniel, I can not agree with you. The semantic and th=
e interface (except the member function size()) of the stack will not be ch=
anged. In fact std::forward_list is the most appropriate container for usin=
g as the base of the stack.&nbsp;.</div><div>&nbsp;</div><div>By the way I =
have not understood what is the problem with push?</div><div><br>=D0=BF=D1=
=8F=D1=82=D0=BD=D0=B8=D1=86=D0=B0, 6 =D1=81=D0=B5=D0=BD=D1=82=D1=8F=D0=B1=
=D1=80=D1=8F 2013&nbsp;=D0=B3., 22:28:07 UTC+4 =D0=BF=D0=BE=D0=BB=D1=8C=D0=
=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C Daniel Kr=C3=BCgler =D0=BD=D0=
=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:</div><blockquote class=3D"gmail_quote" s=
tyle=3D"margin: 0px 0px 0px 0.8ex; padding-left: 1ex; border-left-color: rg=
b(204, 204, 204); border-left-width: 1px; border-left-style: solid;">2013/9=
/6 Vlad from Moscow &lt;<a href=3D"javascript:" target=3D"_blank" gdf-obfus=
cated-mailto=3D"xisTM5GsF8oJ">vlad....@mail.ru</a>&gt;:
<br>&gt; I would like to propose to include specialization of std::stack fo=
r
<br>&gt; std::forward_list.
<br>&gt;
<br>&gt; In fact std::forward_list has already all characteristics of a sta=
ck. There
<br>&gt; will be only one difference compared with the primary class std::s=
tack: &nbsp;the
<br>&gt; specialization will not contain member function size() because
<br>&gt; std::forward_list has no such member.
<br>&gt;
<br>&gt; What will you say?
<br>
<br>After you have "eliminated" size(), how do you proceed with push()?
<br>
<br>I really don't like this suggestion: stack exists to present a
<br>dedicated subset of operations adapted from a container. If you
<br>specialize stack and start to remove or change the semantics of
<br>functions, this is no longer a uniform wrapper. Since you seem to be
<br>interested in a different kind of view on containers, I suggest to
<br>invent a different one and not trying to distort an apple into a
<br>coconut. std::vector&lt;bool&gt; has often been considered as a bad des=
ign
<br>idea, because it does not provide the *same* guarantees as any other
<br>std::vector&lt;T&gt;. Please lets not repeat the same kind of design er=
ror
<br>again.
<br>
<br>- Daniel
<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 />

------=_Part_32_7412352.1378492447354--

.
