> On Jun 8, 2016, at 4:11 PM, Matt Neuburg via swift-evolution 
> <[email protected]> wrote:
> 
> Well, I guess I didn't pick a strong enough case. Try this one:
> 
>        UIView.animate(withDuration:0.4, delay: 0, options: [.autoreverse]) {
>            self.view.backgroundColor = UIColor.red()
>        }
> 
> That doesn't compile. I'm suggesting that it would be cool if it did. m.

Mid-call closure can mean one of several things:

1. Bad design
2. Multiple closures
3. Design before Swift / ObjC focused

To which:

1. Well, not sure that should be "fixed"
2. I think multiple closures should all be treated the same without trailing
3's a different kind of thing. I vaguely endorse having Cocoa request how it 
should be imported beyond the SE-0005 rules. 

We were kicking around some ideas on "how should defaults embetter" that this 
kind of relates to: 
https://gist.github.com/erica/3987ec54b8f4a580ae5fc18f4e9e7ca5 
<https://gist.github.com/erica/3987ec54b8f4a580ae5fc18f4e9e7ca5>  In this 
example, I can see a rule of "if there's only one closure named animation, 
completion, etc, promote it to the last argument". Kind of.

-- E, dithery



_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to