2 ms·
But when you write "condition ? first : second" or "(if condition first second)", the first common value is still given before the second uncommon value, so wha
by DonHopkins 5y ago
But when you write "condition ? first : second" or "(if condition first second)", the first common value is still given before the second uncommon value, so what's the advantage of putting the condition BETWEEN first and second, instead of BEFORE? After all, the condition has to be EVALUATED first before deciding which one to use.
Infix "if" conditions just scramble up the order of evaluation from the order of program source code.
- mixmastamyk 5y agoThe argument is that the most common value should be first and the rest can be thought of as rare and almost ignored. I don’t always agree, but still prefer it to C syntax which I have to look up every time.