Hacker News new | past | comments | ask | show | jobs | submit login

There's also mixfix where the operators are interleaved between the arguments, of which there are more than two. The well-known one is C's conditional operator:

    a ? b : c
This is a single operation `?:` that takes operands a, b, and c.



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.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: