bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 17 days agoThe meaning of thislemmy.mlimagemessage-square72linkfedilinkarrow-up1541
arrow-up1541imageThe meaning of thislemmy.mlbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 17 days agomessage-square72linkfedilink
minus-squareEphera@lemmy.mllinkfedilinkEnglisharrow-up1·16 days 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: