Search code examples
c++operatorssurvey

Which C++ logical operators do you use: and, or, not and the ilk or C style operators? why?


leisure/curiosity question as implied in the title.

I personally prefer the new operators as to make code more readable in my opinion.

Which ones do use yourself? What is your reason for choosing one over the other one?

also Emacs highlights those operators differently so I get more visual feedback when looking at the screen. I know the old operators can be highlighted as well but the ISO646 highlighted by default


Solution

  • I won't use the alternative operators as they cause more confusion then clearity in my opinion.
    If i see an alphabetical name i expect a namespace, class, variable, function or a function style operator - the common operators divide this intuitively into sequences for me. The alternative style just doesn't fit into the C/C++ world for me.

    Also, while Greg has a point regarding people new to C or C++, you get used to it pretty soon - i have no problems spotting ! anywhere.