Xylight (Photon dev)@lemmy.xylight.dev to Programmer Humor@programming.dev · 1 year agoI don't want to use ternarieslemmy.xylight.devimagemessage-square19fedilinkarrow-up1133arrow-down111
arrow-up1122arrow-down1imageI don't want to use ternarieslemmy.xylight.devXylight (Photon dev)@lemmy.xylight.dev to Programmer Humor@programming.dev · 1 year agomessage-square19fedilink
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.