SE-0279: Multiple Trailing Closures [Amended]

I think we should maintain the stance that Swift is (largely) agnostic to the choice of whitespace. Esp. that this is still valid:

// well
func
// umm
foo1
// anyway
(
// this is fine
a:
//
Int) { }

We can agree that no one writes like this. Still, fixing that is probably way out of scope of this proposal. It's more important to figure out a structure that we can encourage, and enforced via style guide.

I want to added my thoughts on this... too. Since function-with-multiple-closure is a largely untouched api space and all. Which ever syntax we go with, the apis will start optimising toward the syntax, and likely away from similar syntaxes. While of course no one can predict the future, we probably want to be more careful than letting it out, then adjust it later.

14 Likes