🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3249

Re: and, or, not

#3249
From: John Galt
Date: Mon, 05 Feb 1996 19:25
43 lines
2732 bytes
In article <1198@dawes.win.net>, Beman Dawes <beman@dawes.win.net> wrote:

>  2.9  Keywords                                                [lex.key]

[snip]

>                   Table 4--alternative representations

>            +------------------------------------------------+
>            |and      and_eq   bitand   bitor   compl    not |
>            |not_eq   or       or_eq    xor     xor_eq       |
>            +------------------------------------------------+

This leads to another question:

Assuming that the problem characters (those that don't exist on some keyboards,
making the above names necessary) are &, |, !, ^, and ~,I wonder why they
didn't create names for all the affected characters.  I would have done
something like this:

  &&   and            &&=  and_eq [a]     &    bitand         &=   bitand_eq
  ||   or             ||=  or_eq  [a]     |    bitor          |=   bitor_eq
  !    not            !=   unequal [b]    ~    compl          ~=   compl_eq
                                          ^    bitxor [c]     ^=   bitxor_eq [c]

[a]  In the draft, these names are not as shown here, but are given to the
     operator at the end of the same row!  This inconsistency will confuse
     users and should be changed now, before someone implements it.

[b]  Should not be called not_eq because it is not an assignment like the
     other ones ending in "_eq".

[c]  Should begin with "bit" like the other bit operators.  If there were
     logical-xor operators ^^ and ^^=, _those_ should be called xor and
     xor_eq.  Those ought to exist.  Also, there ought to be shift-in-place
     operators, <<= and >>=.
--
John David Galt                                I do not speak for my employer.
jgalt@infosoft.com      Send personal mail to:  John_David_Galt@cup.portal.com
---
[ comp.std.c++ is moderated.  Submission address: std-c++@ncar.ucar.edu.
  Contact address: std-c++-request@ncar.ucar.edu.  The moderation policy is
  in http://reality.sgi.com/employees/austern_mti/std-c++/policy.html. ]
Technical Details
Message-ID: <DMBG7p.H7z@infosoft.com>
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern
References: <1198@dawes.win.net>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!fido.asd.sgi.com!austern
From: jgalt@infosoft.com (John Galt)
Newsgroups: comp.std.c++
Subject: Re: and, or, not
Date: 05 Feb 1996 11:25:01 PST
Organization: Infosoft Inc., Cupertino, CA, USA
Approved: austern@isolde.mti.sgi.com
Message-ID: <DMBG7p.H7z@infosoft.com>
References: <1198@dawes.win.net>
NNTP-Posting-Host: isolde.mti.sgi.com
X-Original-Date: Mon, 5 Feb 1996 18:47:48 GMT
Apparently-To: comp-std-c++@uunet.uu.net
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBVAwUBMRZZqUy4NqrwXLNJAQEpEgIApw6ZmlIAXVNZ4a+Y7goKgUMEfeOtoe9e
 gZBRrerUzWBty1efNJpatliWZy8Au0iNRW6VgFQ9vXdJPiGFkxYVJg==
 =B1nv
Originator: austern@isolde.mti.sgi.com