[Dune-devel] [Dune-Commit] [Commit] dune-common - fb7cb2c: [cleanup] Replace or and not by || and !.

Christoph Grüninger christoph.grueninger at iws.uni-stuttgart.de
Sun Mar 15 23:35:09 CET 2015


Hi Carsten,

> could you explain in which sense using ||, &&, and ! instead
> of 'or', 'and', and 'not' can be considered a 'cleanup'?

The occurrences of "and", "not", and "or" are very rare. By 
the
change of these six lines libdunecommon does not use these C++
operator synonyms any more.
Let me quote the lazyweb [1]:
   "As for their use: because they are rarely used, using
    them is often more surprising and confusing than it is
    helpful. I'm sure if it were normal, they would be much
    easier to read, but people are so used to && and ||
    anything else just gets distracting."

> The latter are perfectly valid C++ and supported by any
> conforming C++ compiler.

There is not such a thing as a conforming C++ compiler.
Otherwise we would not constantly work around their bugs ;-)
And Visual C++ needs an additional include to support them.
Maybe this is not a good argument, but my motivation for
the commit.

Bye
Christoph

[1] http://stackoverflow.com/questions/2376448

-- 
Je n'ai rien contre les étrangers, quelques uns de mes 
meilleurs amis
sont des étrangers. Mais ces étrangers là ne sont pas de chez 
nous!
[Agecanonix, Astérix - Le cadeau de César]




More information about the Dune-devel mailing list