220 15316 <46cc4da5-98d1-471f-ab31-714ac5502853@isocpp.org> article
Path: news.gmane.org!not-for-mail
From: Leo Heinsaar <leoheinsaar@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: Re: Isn't it time we had the bool
 std::[container]::contains() family of methods?
Date: Fri, 26 Dec 2014 05:31:42 -0800 (PST)
Lines: 92
Approved: news@gmane.org
Message-ID: <46cc4da5-98d1-471f-ab31-714ac5502853@isocpp.org>
References: <0959f2f8-acdd-4786-b6f3-0f05c62dcee6@isocpp.org>
 <2df86492-548f-42c8-86d6-fe1c8ba3a5a9@isocpp.org>
 <2f390ec3-b259-4150-9771-cd0d02860348@isocpp.org>
 <3743ebda-3367-4fc3-922a-f38d98e57889@isocpp.org>
 <1bccb2dd-4aa4-4f07-8958-b1d6bf092630@isocpp.org>
 <CAA7U3HMcBab8xEJU7w_r3d4cQa8d-DYwVw4BxnsHM_UjyfjAmg@mail.gmail.com>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_5292_1781448045.1419600702034"
X-Trace: ger.gmane.org 1419600712 4973 80.91.229.3 (26 Dec 2014 13:31:52 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 26 Dec 2014 13:31:52 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBCFYDAXXQYEBBPWG6WSAKGQE3XJE7OY@isocpp.org Fri Dec 26 14:31:45 2014
Return-path: <std-proposals+bncBCFYDAXXQYEBBPWG6WSAKGQE3XJE7OY@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+bncBCFYDAXXQYEBBPWG6WSAKGQE3XJE7OY@isocpp.org>)
	id 1Y4UzY-0007BR-UG
	for gclcip-std-proposals@m.gmane.org; Fri, 26 Dec 2014 14:31:45 +0100
Original-Received: by mail-pa0-f69.google.com with SMTP id et14sf79920498pad.0
        for <gclcip-std-proposals@m.gmane.org>; Fri, 26 Dec 2014 05:31:43 -0800 (PST)
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
         :content-type:x-original-sender:reply-to:precedence:mailing-list
         :list-id:list-post:list-help:list-archive:list-subscribe
         :list-unsubscribe;
        bh=u5Ej7ONRFS5T1Cv4plksG22yaQNSa1P719alAH8vhsE=;
        b=0NcCd/ogHRY/Gr6WoAtZRy7inqApjCEbxYDt4t7k5MOg0LZYNRiFjXDrqSbR7KYf2z
         KLdfq0RZIQREtGqdzg+JXDpD5NpeSj5bTdWCWj7v+sNjCT8+dlwKbkOUX6vSzUNDLgSP
         DJoPsfw2S8TVWJ6KbVrFU7lvb9Fi+FfzWca474sXCJAPVYvH0CoagyJHdLdWgvNs3OXF
         6BrVo3CssWVHPJc3EKTK+AJ+8X7rLPWmgm5RLW7xqCu1Uwk9SjcXRhR8vapRfLZruwjz
         meLr0u04hQP4PewTD262vg6TIu799LWAZqlJJc7x4etsW4rQboMCACNvg2kRLGh5rYLM
         1xHQ==
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=u5Ej7ONRFS5T1Cv4plksG22yaQNSa1P719alAH8vhsE=;
        b=LGgdmSChLwNqwUROvhniGvRldOiCU/YIakXFByUlLNNPz1oAnzFTM3OoyeekuuTGg5
         EQQZAEEEmbuvGjKlJS0UdT3PGKWHA2xbNFzKk/5ebpFzeAZRCGGE+TJ3Rz2Ut1flx8z5
         npQvCHng9nDuy31EDc2PE+CcqcsbRhVJC+laaFkXO25DK0sRYRgL51OzpNx5A2/Se1Mr
         q1M+eCVtTwMDJcJ7KOAmISFSvNxSDHRxE3ibUW16fDhaZ+TEMLYIzlx6UORHNmTVhw3H
         0HfRJN6LHI86yUq9RMXJjsUqhcH4I1WxZD3CDJCSpi+wU2IvT+rvmE9gXSfG3t3lNfl7
         j3ng==
X-Gm-Message-State: ALoCoQnnv0zNPxV7faIgQLabN2SNixem1m7w4lrIzznHKU1jEtsCW/SZcrO7W6tOY+CrmYrWbHVw
X-Received: by 10.66.253.3 with SMTP id zw3mr34513171pac.3.1419600703528;
        Fri, 26 Dec 2014 05:31:43 -0800 (PST)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.140.35.239 with SMTP id n102ls1622908qgn.21.gmail; Fri, 26 Dec
 2014 05:31:42 -0800 (PST)
X-Received: by 10.140.93.226 with SMTP id d89mr13845qge.13.1419600702683;
        Fri, 26 Dec 2014 05:31:42 -0800 (PST)
In-Reply-To: <CAA7U3HMcBab8xEJU7w_r3d4cQa8d-DYwVw4BxnsHM_UjyfjAmg@mail.gmail.com>
X-Original-Sender: leoheinsaar@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:15316
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/15316>

------=_Part_5292_1781448045.1419600702034
Content-Type: multipart/alternative; 
	boundary="----=_Part_5293_580285841.1419600702035"

------=_Part_5293_580285841.1419600702035
Content-Type: text/plain; charset=UTF-8

On Friday, December 26, 2014 4:50:15 PM UTC+4, Olaf van der Spek wrote:
>
> On Fri, Dec 26, 2014 at 10:30 AM, Leo Heinsaar <leohe...@gmail.com 
> <javascript:>> wrote: 
> > Sorry Andy - I took a closer look at Bjarne's proposal; it seems like if 
> it 
> > goes through, we'll indeed be able to have a global contains() with all 
> the 
> > benefits with respect to having it for arrays and such, invokable via 
> > vec.contains(x) syntax. (It really is about nicer syntax as well as less 
> - a 
> > lot less - typing.) 
>
> How is it less typing? Auto-complete? 
>

Since we'll be able to simply write

*phone_book.contains(number)*

instead of:

*phone_book.find(number) != phone_book.end()*

Not to mention how much more clearly the simplified version, as they like 
to call it, expresses intent.

-- 

--- 
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.
Visit this group at http://groups.google.com/a/isocpp.org/group/std-proposals/.

------=_Part_5293_580285841.1419600702035
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">On Friday, December 26, 2014 4:50:15 PM UTC+4, Olaf van de=
r Spek wrote:<blockquote class=3D"gmail_quote" style=3D"margin: 0;margin-le=
ft: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;">On Fri, Dec 26, 2=
014 at 10:30 AM, Leo Heinsaar &lt;<a href=3D"javascript:" target=3D"_blank"=
 gdf-obfuscated-mailto=3D"2jF1ZAHCS9cJ" onmousedown=3D"this.href=3D'javascr=
ipt:';return true;" onclick=3D"this.href=3D'javascript:';return true;">leoh=
e...@gmail.com</a>&gt; wrote:
<br>&gt; Sorry Andy - I took a closer look at Bjarne's proposal; it seems l=
ike if it
<br>&gt; goes through, we'll indeed be able to have a global contains() wit=
h all the
<br>&gt; benefits with respect to having it for arrays and such, invokable =
via
<br>&gt; vec.contains(x) syntax. (It really is about nicer syntax as well a=
s less - a
<br>&gt; lot less - typing.)
<br>
<br>How is it less typing? Auto-complete?
<br></blockquote><div><br></div><div>Since we'll be able to simply write</d=
iv><blockquote style=3D"margin: 0 0 0 40px; border: none; padding: 0px;"><d=
iv><b>phone_book.contains(number)</b></div></blockquote><div><span style=3D=
"font-size: 13px;">instead of:</span></div><blockquote style=3D"margin: 0 0=
 0 40px; border: none; padding: 0px;"><div><span style=3D"font-size: 13px;"=
><b>phone_book.find(number) !=3D phone_book.end()</b></span></div></blockqu=
ote><div>Not to mention how much more clearly the simplified version, as th=
ey like to call it, expresses intent.</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 />

------=_Part_5293_580285841.1419600702035--
------=_Part_5292_1781448045.1419600702034--

.
