Xylight (Photon dev)@lemmy.xylight.dev to Programmer Humor · 1 year agoI don't want to use ternarieslemmy.xylight.devimagemessage-square20fedilinkarrow-up1148arrow-down111
arrow-up1137arrow-down1imageI don't want to use ternarieslemmy.xylight.devXylight (Photon dev)@lemmy.xylight.dev to Programmer Humor · 1 year agomessage-square20fedilink
minus-squareGTG3000linkfedilinkarrow-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.