@jroid8@lemmy.world to Programmer Humor@lemmy.ml • 7 months agoknow the features of your languagelemmy.worldimagemessage-square145fedilinkarrow-up1640arrow-down124
arrow-up1616arrow-down1imageknow the features of your languagelemmy.world@jroid8@lemmy.world to Programmer Humor@lemmy.ml • 7 months agomessage-square145fedilink
minus-square@ugo@feddit.itlinkfedilink13•7 months agoIf 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;
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;
It’s nil, and you can coalesce it with ??