|
|
|
|
|
by Twisol
457 days ago
|
|
If there are two ways to say something, then people will find ways to make their choice of method into speech as well. To me and my style of coding, there's a difference of intent between the two. A ternary connotes a mere computation, something that should have no side-effects. A conditional connotes a procedure; the arms of the conditional might be expected to have side-effects. (And the case of `if (_) return` or similar are pure control flow guards; they neither compute a value nor perform a procedure as such.) It's not just about where the symbols go on the screen. |
|