(Shamelessly stolen from reddit)

you are viewing a single comment's thread
view the rest of the comments
[–] 7 points 1 year ago* (1 child)

I really like the way kotlin is doing it. The readability of the first one and still a direct assignment.

var a = if (isTrue) 2 else 9

  • source
  • parent
  • hideshow 1 child comment