Comment Comment by Plaastix In Kotlin, if is an expression: https://kotlinlang.org/docs/reference/control-flow.html. This is why the language drops Java's ternary operator. parent Plaastix 7 years ago