jroid8@lemmy.world to Programmer Humor@lemmy.ml · 1 year agoknow the features of your languagelemmy.worldimagemessage-square146fedilinkarrow-up1646arrow-down124
arrow-up1622arrow-down1imageknow the features of your languagelemmy.worldjroid8@lemmy.world to Programmer Humor@lemmy.ml · 1 year agomessage-square146fedilink
minus-squarebamboo@lemm.eelinkfedilinkarrow-up18arrow-down1·1 year agoI’m learning swift and I actually just discovered ?? today. Am I missing out in other languages?
minus-squarehstde@feddit.delinkfedilinkarrow-up13·1 year agoYes, it’s very useful when applied correctly. I’m always disappointed when I remember, that I can’t use such a feature, because I’m stuck using Java.
minus-squarejape@infosec.publinkfedilinkarrow-up1·1 year agoMaybe you’r using an older version of Java? Works fine for me.
minus-squarehstde@feddit.delinkfedilinkarrow-up1·edit-21 year agoNew versions of java have a null coalescing operator? I didn’t know that. Edit: a short search didn’t return any answers, as far as I can see java doesn’t have this operator, the closest thing is the ternary if operator.
I’m learning swift and I actually just discovered
??
today. Am I missing out in other languages?C# and Kotlin both have it
Yes, it’s very useful when applied correctly.
I’m always disappointed when I remember, that I can’t use such a feature, because I’m stuck using Java.
Maybe you’r using an older version of Java? Works fine for me.
New versions of java have a null coalescing operator?
I didn’t know that.
Edit: a short search didn’t return any answers, as far as I can see java doesn’t have this operator, the closest thing is the ternary if operator.
PHP too
JavaScript and TypeScript too
C#