4 ms·
I don't think it really improves readability. All the programmers are familiar with && and ||, and using something else will just confuse people. Also, it's no
by kostya-kow 13y ago
I don't think it really improves readability. All the programmers are familiar with && and ||, and using something else will just confuse people.
Also, it's not really that hard to #define it yourself, instead of using includes.
- jacobparker 13y agoI definitely wouldn't use them because they are unfamiliar. However, in my head I pronounce "&&" as "and" and "&" as "bitand", so using and/bitand over &&/& would reduce a depressingly not-uncommon typo for me. However, on balance, not worth it to me. Note that in C++ they are keywords which is superior to macros.
- kostya-kow 13y agoHow are they superior?
- mikeash 13y agoFor one, a macro "and" would prevent you from using "and" as the name of a struct field, while a keyword will not. Error reporting will be better too. The differences don't seem all that big though.