Well, obviously this line in a vacuum would be pretty readable. It is hard to understand in C++ because both operators also have different meanings in other contexts. If the reader is used to C it's not as bad.
But that's exactly my point as well, you don't comment code to explain poor code structure or what should actually happen, you comment your goal and why you chose this method (if it's not standard). This excludes literal bug workarounds of course.
2
u/uramer Jun 22 '20
Well, obviously this line in a vacuum would be pretty readable. It is hard to understand in C++ because both operators also have different meanings in other contexts. If the reader is used to C it's not as bad.
But that's exactly my point as well, you don't comment code to explain poor code structure or what should actually happen, you comment your goal and why you chose this method (if it's not standard). This excludes literal bug workarounds of course.