Xylight (Photon dev)@lemmy.xylight.dev to Programmer Humor@programming.dev · 1 year agoI don't want to use ternarieslemmy.xylight.devimagemessage-square20fedilinkarrow-up1148arrow-down110
arrow-up1138arrow-down1imageI don't want to use ternarieslemmy.xylight.devXylight (Photon dev)@lemmy.xylight.dev to Programmer Humor@programming.dev · 1 year agomessage-square20fedilink
minus-squareGTG3000@programming.devlinkfedilinkarrow-up1·1 year agoand then you have lua local result = condition and a or b I’m not complaining, although it gets a little confusing when one of the results is falsey. Which is a rarity since only false and nil are falsey in lua.
minus-squareXylight (Photon dev)@lemmy.xylight.devOPlinkfedilinkarrow-up1·1 year agoStill less intuitive than Kotlin’s if expressions.
minus-squareLeyla :)@lemmy.fmhy.mllinkfedilinkarrow-up1·1 year agoIt’s amazing what people have made in Roblox with that language.
and then you have lua
local result = condition and a or b
I’m not complaining, although it gets a little confusing when one of the results is falsey. Which is a rarity since only
false
andnil
are falsey in lua.Still less intuitive than Kotlin’s if expressions.
It’s amazing what people have made in Roblox with that language.