bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 6 days agoThe meaning of thisimagemessage-square70linkfedilinkarrow-up1536arrow-down114
arrow-up1522arrow-down1imageThe meaning of thisbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 6 days agomessage-square70linkfedilink
minus-squareEphera@lemmy.mllinkfedilinkEnglisharrow-up1·5 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: