▲ 84 ▼ ternary opruleator (lemmy.blahaj.zone) submitted 11 months ago by guber@lemmy.blahaj.zone to c/onehundredninetysix@lemmy.blahaj.zone 19 comments fedilink hide all child comments cross-posted from: https://lemmy.blahaj.zone/post/31679150 proportional reaction
[–] SubArcticTundra@lemmy.ml 18 points 11 months ago (1 child) Meanwhile Rust, where every control flow has a return value permalink fedilink source hideshow 2 child comments replies: [–] eupraxia@lemmy.blahaj.zone 15 points 11 months ago (2 children) 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 }; permalink fedilink source parent hideshow 4 child comments replies: [–] SubArcticTundra@lemmy.ml 3 points 11 months ago Yep permalink fedilink source parent [–] JackbyDev@programming.dev 1 point 11 months ago Yeah if-then expressions are really nice. permalink fedilink source parent
[–] eupraxia@lemmy.blahaj.zone 15 points 11 months ago (2 children) 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 }; permalink fedilink source parent hideshow 4 child comments replies: [–] SubArcticTundra@lemmy.ml 3 points 11 months ago Yep permalink fedilink source parent [–] JackbyDev@programming.dev 1 point 11 months ago Yeah if-then expressions are really nice. permalink fedilink source parent
[–] JackbyDev@programming.dev 1 point 11 months ago Yeah if-then expressions are really nice. permalink fedilink source parent