As a "regular user" I wholeheartedly agree with everything Robert just said. 
Syntactic consistency between function parameters and closure parameters is a 
big win for usability and discoverability.

I actually did not know that it was possible to destructure tuples in closure 
arguments before this discussion happened. If the syntax had been more explicit 
and consistent (parens required for arguments and tuples as described below and 
in previous emails) I could have discovered this great feature on my own a long 
time ago.

-Noah Desch


> On Jun 8, 2017, at 5:39 PM, Robert Bennett via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> Now, for closures, I think we should just apply the same principles. Require 
> parentheses for the arguments, which means double parentheses (or more) are 
> needed when unwrapping a tuple.
> 
> In my view cognitive load is a big part of ergonomics. Reducing the rule set 
> to a single principle seems very ergonomic to me.
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to