hyperoslo / iOS-playbook

Hyper's iOS playbook
Other
227 stars 28 forks source link

Swift: () -> () vs () -> Void #134

Closed 3lvis closed 8 years ago

3lvis commented 9 years ago

Everyone else: The Swift Programming Language ebook refers exclusively to () -> (). APIs all use () -> Void.

I much prefer the Void typealias because it better matches return conventions in the Objective-C world.

And now, word of Apple at devforums: “FWIW, we’ve recently decided to standardize on () -> Void (generally, () for parameters and Void for return types) across all of our documentation.”

http://ericasadun.com/2015/05/11/swift-vs-void/

zenangst commented 9 years ago

I prefer () -> Void

kostiakoval commented 9 years ago

Good one! +1 to () -> Void

3lvis commented 8 years ago

Closing old issues, since they might not be relevant.