2 ms·
How does this differ semantically from the C ternary operator? Not syntactically, in its outcome and expression of a testable boolean clause, and a left or righ
by ggm 5y ago
How does this differ semantically from the C ternary operator? Not syntactically, in its outcome and expression of a testable boolean clause, and a left or right side choice which is the assignment value?
- codr7 5y agoNot much. But syntax matters; a ternary expression tells me at a glance that there's no funny stuff going on, it's just making a choice between two expressions. In Go I have to scan every single branch when reading to make sure.