You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this rule should follow from two other rules:
Don't use (Void) as a closure input; just use ().
Use Void instead of () for closure outputs.
Especially with Swift 3's enforcement of parentheses for inputs, I think this adds clarity.
*I do think Void may be better as a tuple element than (). e.g.
letƒ:(Void,Int)->Void={_, int in}letvoid:Void=ƒ((),1)ƒ(void,2)
I have never felt a desire to use something like this, but that doesn't mean it might not have a use, and it compiles. I like that signature better than this one:
This seems to be the standard these days. () -> (), (Void) -> () are not preferred.
The text was updated successfully, but these errors were encountered: