Lena@gregtech.eu to Programmer Humor@programming.devEnglish · 4 个月前Perfect relationshipgregtech.euimagemessage-square14linkfedilinkarrow-up1274arrow-down141file-text
arrow-up1233arrow-down1imagePerfect relationshipgregtech.euLena@gregtech.eu to Programmer Humor@programming.devEnglish · 4 个月前message-square14linkfedilinkfile-text
minus-squareTJA!@sh.itjust.workslinkfedilinkarrow-up7·4 个月前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
minus-square48954246@lemmy.worldlinkfedilinkEnglisharrow-up3·4 个月前I like the python way as it reads more naturally a = 2 if isTrue else 9
deleted by creator
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 9I like the python way as it reads more naturally
a = 2 if isTrue else 9