bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 4 months agoThe meaning of thislemmy.mlexternal-linkmessage-square65linkfedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkThe meaning of thislemmy.mlbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 4 months agomessage-square65linkfedilink
minus-squareEphera@lemmy.mllinkfedilinkEnglisharrow-up0·4 months agoThe conventional ternary is structured like a normal if-else. In fact, in many languages with functional influence, they’re the same thing. For example, you can write this in Rust: let vegetable = if 3 > 4 { "Potato" } else { "Tomato" };
The conventional ternary is structured like a normal if-else. In fact, in many languages with functional influence, they’re the same thing.
For example, you can write this in Rust: