Xylight (Photon dev)@lemmy.xylight.dev to Programmer Humor@programming.dev · 1 year agoI don't want to use ternarieslemmy.xylight.devimagemessage-square10fedilinkarrow-up111arrow-down13
arrow-up18arrow-down1imageI don't want to use ternarieslemmy.xylight.devXylight (Photon dev)@lemmy.xylight.dev to Programmer Humor@programming.dev · 1 year agomessage-square10fedilink
minus-squareGTG3000@programming.devlinkfedilinkarrow-up0·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-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.It’s amazing what people have made in Roblox with that language.