re: We don't need a ternary operator VIEW POST

TOP OF THREAD FULL DISCUSSION
re: In many (all?) the languages that have the ternary operator if is a statement (rather than an expression). In Ruby if is an expression but the la...
 

And in Kotlin! Although Kotlin doesn't have a ternary operator.

It has the Elvis Operator ?: which behaves like C's ternary operator when you omit the middle value... So it's the same as C#'s coallessing operator (??) but it has a groovier syntax!

code of conduct - report abuse