loading...

re: What do you think about the ternary operator? VIEW POST

FULL DISCUSSION
 

I prefer if expressions (e.g. in Scala):
val res = if(a) 1 else if(b) 2 else 3
It just feels more natural and concise

code of conduct - report abuse