(Shamelessly stolen from reddit)

  • TJA!
    link
    fedilink
    7
    edit-2
    10 days ago

    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