Sleepzy@feddit.it to Programmer Humor@lemmy.ml · 3 days agoElvisfeddit.itexternal-linkmessage-square29fedilinkarrow-up1155arrow-down18
arrow-up1147arrow-down1external-linkElvisfeddit.itSleepzy@feddit.it to Programmer Humor@lemmy.ml · 3 days agomessage-square29fedilink
minus-squareAVincentInSpace@pawb.sociallinkfedilinkEnglisharrow-up2·2 days agowhy would you call it anything other than the ternary operator
minus-squaredev_null@lemmy.mllinkfedilinkarrow-up1·edit-28 hours agoBecause it’s not one. Ternary operator is A ? B : C, Elvis operator is A ?: B. The same two characters are involved, but both the syntax and effect is different.
minus-squareQuazarOmega@lemy.lollinkfedilinkarrow-up2·1 day agoRead further down on my other comment to understand, it’s just how the operator looks
why would you call it anything other than the ternary operator
Because it’s not one. Ternary operator is A ? B : C, Elvis operator is A ?: B. The same two characters are involved, but both the syntax and effect is different.
Read further down on my other comment to understand, it’s just how the operator looks