DEV Community

loading...

Discussion on: What do you think about the ternary operator?

Collapse
soerenfandrich profile image
Sören Fandrich

It's like an if-else in Scala, that returns a value. Nothing wrong with that, it's just that ? : is not intuitive to read. But if used carefully, and not just showing off how smart you are ;-) it can actually improve readability.