wnagrodzki / iOSProgrammingGuidelines

2 stars 0 forks source link

Using shorthand arguments in closures #17

Open wnagrodzki opened 6 years ago

wnagrodzki commented 6 years ago

From Advanced Swift

If the closure is more complicated, it’s almost always a better idea to name the arguments explicitly, as we’ve done before. It’s really a matter of personal taste — choose whichever is more readable at a glance. A good rule of thumb is this: if the closure fits neatly on one line, shorthand argument names are a good fit.