@kraagenskul said:
Many if-else statements can simply be modified to use the ternary operator, but many programmers are either unfamiliar with it or unwilling to use it. I try to use it where ever possible and I find you can guage a coder's skill based on their using it. But that measurement went out the window the other day:
x = (logic statement) ? true : false;
Multiple times throughout their code, and the occasional:
x = (logic statement) ? false : true;
I can do better:
(x > max) ? (max = x) : (max = max);
Found in production code.