(Shamelessly stolen from reddit)

  • TJA!@sh.itjust.works
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    1 day 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