C/C++: Who uses the logical operator macros from iso646.h and why?
Posted
by
Jaime Soto
on Programmers
See other posts from Programmers
or by Jaime Soto
Published on 2011-02-11T18:20:42Z
Indexed on
2011/02/11
23:33 UTC
Read the original article
Hit count: 378
There has been some debate at work about using the merits of using the alternative spellings for C/C++ logical operators in iso646.h
:
and &&
and_eq &=
bitand &
bitor |
compl ~
not !
not_eq !=
or ||
or_eq |=
xor ^
xor_eq ^=
According to Wikipedia, these macros facilitate typing logical operators in international (non-US English?) and non-QWERTY keyboards. All of our development team is in the same office in Orlando, FL, USA and from what I have seen we all use the US English QWERTY keyboard layout; even Dvorak provides all the necessary characters.
Supporters of using the iso646.h
macros claim we should them because they are part of the C and C++ standards. I think this argument is moot since digraphs and trigraphs are also part of these standards and they are not even supported by default in many compilers.
My rationale for opposing these macros in our team is that we do not need them since:
- Everybody on our team uses the US English QWERTY keyboard layout;
- C and C++ programming books from the US barely mention
iso646.h
, if at all; and - new developers may not be familiar with
iso646.h
(this is expected if they are from the US).
/rant
Finally, to my set of questions:
- Does anyone in this site use the
iso646.h
logical operator macros? Why? - What is your opinion about using the
iso646.h
logical operator macros in code written and maintained on US English QWERTY keyboards? - Is my digraph and trigraph analogy a valid argument against using
iso646.h
with US English QWERTY keyboard layouts?
EDIT:
I missed two similar questions in StackOverflow:
© Programmers or respective owner