Name: rmT116609 Date: 10/24/2001
ISO C++ recognizes several "synonym" keyword tokens as part of the language;
ISO C provides a standard header file <iso646.h> which defines macros that
provide the same functionality as the C++ keywords. This request for
enhancement deals specifically with three of those keywords: 'and', 'or',
While I realize that Java is not C or C++, it still would be convenient to be
able to use keywords 'and', 'or', and 'not' in place of the existing logical
operators '&&', '||', and '!', respectively. The intent is to render logical
expressions a little more human-readable.
if (a > b || !big && a != null) ... // old
if (a > b or not big and a != null) ... // new
Personally, I find the English words more immediately understandable than the
old C punctuation operators.
Note that this request does not advocate the adoption of the other ISO C++
synonym keywords (e.g., 'xor_eq'). The other operators ('~', '>', etc.) look
fine to me as they are. Nor does this request advocate eliminating the
existing logical operators, but simply adding additional synonyms for them.
The drawback to this proposal, of course, is that it carries a low
benefits-to-weight ratio. And adding the new keywords might break existing
code (though I think this is fairly unlikely). This would probably be placed
in the "syntactic sugar" category.
(Review ID: 134396)