• @ugo
    link
    137 months ago

    If this was cpp, clang-tidy would tell you “do not use else after return”

    I don’t know how null works in swift, but assuming it coerces to bool I’d write

    if (a) return a;
    return b;
    
    • @eutampieri
      link
      37 months ago

      It’s nil, and you can coalesce it with ??