• @[email protected]
    link
    fedilink
    1410 months ago

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

    • qaz
      link
      1710 months ago

      C# and Kotlin both have it

    • @[email protected]
      link
      fedilink
      1110 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.

        • @[email protected]
          link
          fedilink
          1
          edit-2
          10 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.