220 18687 <mm1m79$pcs$1@ger.gmane.org> article
Path: news.gmane.org!not-for-mail
From: Matthew Woehlke <mwoehlke.floss@gmail.com>
Newsgroups: gmane.comp.lang.c++.isocpp.proposals
Subject: Re: if not (expression) like python
Date: Fri, 19 Jun 2015 14:15:05 -0400
Lines: 57
Approved: news@gmane.org
Message-ID: <mm1m79$pcs$1@ger.gmane.org>
References: <51565265-ec78-4f6b-b684-64aed8fd9a57@isocpp.org> <558400A2.2040005@gmail.com> <8f64343f-e5b8-424a-83df-4385c46c5ef9@isocpp.org> <1464415.iy2aHB31Tl@tjmaciei-mobl4>
Reply-To: std-proposals@isocpp.org
NNTP-Posting-Host: plane.gmane.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Trace: ger.gmane.org 1434738026 31690 80.91.229.3 (19 Jun 2015 18:20:26 GMT)
X-Complaints-To: usenet@ger.gmane.org
NNTP-Posting-Date: Fri, 19 Jun 2015 18:20:26 +0000 (UTC)
To: std-proposals@isocpp.org
Original-X-From: std-proposals+bncBC37LBFWUIFBBWN2SGWAKGQEM5YWGUA@isocpp.org Fri Jun 19 20:20:13 2015
Return-path: <std-proposals+bncBC37LBFWUIFBBWN2SGWAKGQEM5YWGUA@isocpp.org>
Envelope-to: gclcip-std-proposals@m.gmane.org
Original-Received: from mail-lb0-f199.google.com ([209.85.217.199])
	by plane.gmane.org with esmtp (Exim 4.69)
	(envelope-from <std-proposals+bncBC37LBFWUIFBBWN2SGWAKGQEM5YWGUA@isocpp.org>)
	id 1Z60te-00033Z-V7
	for gclcip-std-proposals@m.gmane.org; Fri, 19 Jun 2015 20:20:11 +0200
Original-Received: by lbbti3 with SMTP id ti3sf30266464lbb.1
        for <gclcip-std-proposals@m.gmane.org>; Fri, 19 Jun 2015 11:20:10 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20130820;
        h=x-gm-message-state:to:from:subject:date:lines:message-id:references
         :mime-version:content-type:content-transfer-encoding:user-agent
         :in-reply-to:x-original-sender:x-original-authentication-results
         :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group
         :list-post:list-help:list-archive:list-subscribe:list-unsubscribe;
        bh=opZFT93O3MA0z815YtlybKwb0hFqpvr1kULBb8e19RU=;
        b=KD5MSrnhSxmIbRKOoSczXidLSWF6KtXtyoiYEFJnR16w3xK5KiNg7TTdC9FPUk6ocA
         lIyLQMEE6rEsyt8hi60gA/tHRhGwYWV6KKO0X2OiZWVPJPpV8TDp0RxHJeY5ab2D4MhG
         90Z640qdxhcES03UHDRSRrcX/8ikCV1fiJBPkP2395RiXJXo4hHhTTqieS10WOoqA+NQ
         xtBBLYWqjcTpJVOOjGnrj4/4u+bb+oyhtOIz3sdnnRxXVYOdEKEVdVZMDPn5ID4hbhPS
         zKcX9mCF9AxYqdIjw5+k+3nBjBF37VPhqzsEE71mF7CNIEJT8Hy 
X-Gm-Message-State: ALoCoQkBX3Sdf4d2NaVRIVI9A5BhB+ybTCMk0fBIEMbcmLkqwUfeVsLkfRtTh3/8eeKuWZ/CWUXN
X-Received: by 10.194.179.42 with SMTP id dd10mr8802905wjc.7.1434738010501;
        Fri, 19 Jun 2015 11:20:10 -0700 (PDT)
X-BeenThere: std-proposals@isocpp.org
Original-Received: by 10.152.21.71 with SMTP id t7ls690153lae.31.gmail; Fri, 19 Jun
 2015 11:20:09 -0700 (PDT)
X-Received: by 10.112.57.20 with SMTP id e20mr18938714lbq.123.1434738009027;
        Fri, 19 Jun 2015 11:20:09 -0700 (PDT)
Original-Received: from plane.gmane.org (plane.gmane.org. [80.91.229.3])
        by mx.google.com with ESMTPS id le1si9760911lac.158.2015.06.19.11.20.08
        for <std-proposals@isocpp.org>
        (version=TLSv1 cipher=RC4-SHA bits=128/128);
        Fri, 19 Jun 2015 11:20:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as permitted sender) client-ip=80.91.229.3;
Original-Received: from list by plane.gmane.org with local (Exim 4.69)
	(envelope-from <gclcip-std-proposals@m.gmane.org>)
	id 1Z60tZ-0002y5-85
	for std-proposals@isocpp.org; Fri, 19 Jun 2015 20:20:05 +0200
Original-Received: from tripoint.kitware.com ([66.194.253.20])
        by main.gmane.org with esmtp (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Fri, 19 Jun 2015 20:20:05 +0200
Original-Received: from mwoehlke.floss by tripoint.kitware.com with local (Gmexim 0.1 (Debian))
        id 1AlnuQ-0007hv-00
        for <std-proposals@isocpp.org>; Fri, 19 Jun 2015 20:20:05 +0200
X-Injected-Via-Gmane: http://gmane.org/
Original-Lines: 45
Original-X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: tripoint.kitware.com
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
In-Reply-To: <1464415.iy2aHB31Tl@tjmaciei-mobl4>
X-Original-Sender: mwoehlke.floss@gmail.com
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com:
 domain of gclcip-std-proposals@m.gmane.org designates 80.91.229.3 as
 permitted sender) smtp.mail=gclcip-std-proposals@m.gmane.org;
       dmarc=fail (p=NONE dis=NONE) header.from=gmail.com
Precedence: list
Mailing-list: list std-proposals@isocpp.org; contact std-proposals+owners@isocpp.org
List-ID: <std-proposals.isocpp.org>
X-Spam-Checked-In-Group: 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:18687
Archived-At: <http://permalink.gmane.org/gmane.comp.lang.c++.isocpp.proposals/18687>

Even more OT...

On 2015-06-19 13:46, Thiago Macieira wrote:
>        and       &&
>        and_eq    &=3D
>        bitand    &
>        bitor     |
>        compl     ~
>        not       !
>        not_eq    !=3D
>        or        ||
>        or_eq     |=3D
>        xor       ^
>        xor_eq    ^=3D
>=20
> See 2.11 [lex.key]/2 and 2.12 [lex.operators].

Ugh, the inconsistencies...

- 'xor' is a bitwise operator, but bitwise and/or are 'bitand'/'bitor',
while 'and'/'or' are Boolean operators. (Incidentally, Boolean xor is
spelled '!=3D', or more precisely, 'bool(a) !=3D bool(b)'.)

- 'not_eq' is a binary operator which takes two immutable values and
returns a 'bool', while the other '_eq' are all assignment operators...
also binary, technically, but "returning" a reference to the LHS (not
frequently used, hence the quotes) which is modified according to the
RHS value.

(And yes, I know exceptions to the above statements may exist in the
case of esoteric and dubious user-defined operators, e.g. an operator!=3D
that mutates its inputs.)


I doubt these are used enough to be worth bothering, or I'd be tempted
to add:

  is      =E2=86=92  =3D=3D
  is_not  =E2=86=92  !=3D
  bitxor  =E2=86=92  ^

....and to deprecate 'xor' and 'not_eq' :-).

--=20
Matthew

--=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/.

.
