bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 8 months agoThe meaning of thislemmy.worldimagemessage-square9linkfedilinkarrow-up12arrow-down10cross-posted to: programmer_humor@programming.dev
arrow-up12arrow-down1imageThe meaning of thislemmy.worldbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 8 months agomessage-square9linkfedilinkcross-posted to: programmer_humor@programming.dev
minus-squareEphera@lemmy.mllinkfedilinkEnglisharrow-up1·8 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: