bestelbus22@lemmy.worldcake to Programmer Humor@lemmy.mlEnglish · 7 months agoThe meaning of thislemmy.mlimagemessage-square71fedilinkarrow-up1546arrow-down114
arrow-up1532arrow-down1imageThe meaning of thislemmy.mlbestelbus22@lemmy.worldcake to Programmer Humor@lemmy.mlEnglish · 7 months agomessage-square71fedilink
minus-squareEphera@lemmy.mllinkfedilinkEnglisharrow-up2·7 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: