622
submitted 11 months ago by jroid8@lemmy.world to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] bamboo@lemm.ee 17 points 11 months ago

I’m learning swift and I actually just discovered ?? today. Am I missing out in other languages?

[-] qaz@lemmy.world 17 points 11 months ago

C# and Kotlin both have it

[-] hstde@feddit.de 13 points 11 months ago

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.

[-] jape@infosec.pub 1 points 11 months ago

Maybe you'r using an older version of Java? Works fine for me.

[-] hstde@feddit.de 1 points 11 months ago* (last edited 11 months ago)

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.

[-] Psaldorn@lemmy.world 9 points 11 months ago
[-] reboot6675@sopuli.xyz 7 points 11 months ago

JavaScript and TypeScript too

this post was submitted on 08 Dec 2023
622 points (96.4% liked)

Programmer Humor

32509 readers
466 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS