Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Except that the ternary operator in C and C++ is not really an operator but a control flow construct.


It's an operator because it's functional (although often with side effects): three expressions go in and one expression goes out. Control flow constructs deal with statements instead.


It's an operator in the syntactic sense in the same way that "=", ".", and "||" are all operators.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: