guber@lemmy.blahaj.zone to 196@lemmy.blahaj.zoneEnglish · 3 months agoternary opruleatorlemmy.blahaj.zoneimagemessage-square19fedilinkarrow-up191arrow-down17file-textcross-posted to: [email protected]
arrow-up184arrow-down1imageternary opruleatorlemmy.blahaj.zoneguber@lemmy.blahaj.zone to 196@lemmy.blahaj.zoneEnglish · 3 months agomessage-square19fedilinkfile-textcross-posted to: [email protected]
minus-squareSubArcticTundra@lemmy.mllinkfedilinkEnglisharrow-up18·3 months agoMeanwhile Rust, where every control flow has a return value
minus-squareeupraxia@lemmy.blahaj.zonelinkfedilinkEnglisharrow-up15·3 months agoit’s great, instead of ?: bullshit we just use if/else like it always should have been: let x = if y > 3 { 7 } else { 4 };
minus-squareJackbyDev@programming.devlinkfedilinkEnglisharrow-up1·3 months agoYeah if-then expressions are really nice.
Meanwhile Rust, where every control flow has a return value
it’s great, instead of ?: bullshit we just use if/else like it always should have been:
let x = if y > 3 { 7 } else { 4 };Yep
Yeah if-then expressions are really nice.