jroid8@lemmy.world to Programmer Humor@lemmy.ml · 1 year agoknow the features of your languagelemmy.worldimagemessage-square143fedilinkarrow-up1641arrow-down124
arrow-up1617arrow-down1imageknow the features of your languagelemmy.worldjroid8@lemmy.world to Programmer Humor@lemmy.ml · 1 year agomessage-square143fedilink
minus-squareugo@feddit.itlinkfedilinkarrow-up16arrow-down3·1 year 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;
minus-squareeutampieri@feddit.itlinkfedilinkarrow-up3·1 year agoIt’s nil, and you can coalesce it with ??
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 ??