guber@lemmy.blahaj.zone to Lemmy Shitpost@lemmy.world · 5 months agoproportional reactionlemmy.blahaj.zoneimagemessage-square15linkfedilinkarrow-up11arrow-down10
arrow-up11arrow-down1imageproportional reactionlemmy.blahaj.zoneguber@lemmy.blahaj.zone to Lemmy Shitpost@lemmy.world · 5 months agomessage-square15linkfedilink
minus-squarePeriodicallyPedantic@lemmy.calinkfedilinkarrow-up0·5 months agoBah Ternary is just a compressed if-elseif-else chain with a guaranteed assignment. If you format it like a sane person, or like you would an if/else chain, then it’s way easier to read than if/else chains.
minus-squareguber@lemmy.blahaj.zoneOPlinkfedilinkarrow-up0·5 months agoif else chain? believe of or not, straight to jail.
Bah
Ternary is just a compressed if-elseif-else chain with a guaranteed assignment.
If you format it like a sane person, or like you would an if/else chain, then it’s way easier to read than if/else chains.
if else chain? believe of or not, straight to jail.