I prefer &&
instead of and
.
&&
is widely known and accepted, while many don't even know that and is valid C++.
- Some IDEs don't accept
and
(and friends) by default. For example MSVC++.
- At least for me, the operator precedence of
&&
and ||
is ingrained into my head. While and
and or
have the same precedences as &&
and ||
, the simple fact that I'm much less used to them makes it harder to read a condition.
On the other hand, and
is more verbose and might be easier to use for programmers who have learned programming with languages that don't use &&
. But one could argue that these people should learn C++ rather than try to change it's snytax.