[Bug 186] 'and' and 'or' as alternatives for && and ||

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 9 02:03:45 PDT 2006


http://d.puremagic.com/bugzilla/show_bug.cgi?id=186


bugzilla at digitalmars.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |WONTFIX




------- Comment #1 from bugzilla at digitalmars.com  2006-06-09 04:03 -------
In C++, 'and' and 'or' are already alternatives for && and ||, and they have
the same precedence as && and ||. Adding them to D, but with different
precedence, is likely to cause confusion and hard to spot bugs, especially for
someone who is a long time C or C++ programmer.

The reason they were added to C++ was not because they were more readable, but
because some keyboards don't have & and | keys. This has turned out to be a
waste of time - most programmers find the "alternative tokens" to be awful and
find it easier to spend $10 on a new keyboard.

Many people believe that C and C++ (and by implication D) already have far too
many operators and too many precedence levels. Adding more will not be welcomed
- unless those new operators really solved a desperate problem. That's a pretty
high bar to overcome.

And lastly, this is a bug list. Feature enhancement requests shouldn't go here.
Discussion about feature requests should go in the newsgroups, and there are
wiki pages with lists of the more popular ones.


-- 




More information about the Digitalmars-d-bugs mailing list