The way I interpreted SE-110 is that it was suppose to address anonymous 
arguments. 

Instead of using $0.0, $0.1, One needs to use $0, $1 when there are multiple 
arguments. 

I was not aware of any implications for explicitly named parameters. 

Perhaps the issue is with the signature of forEach. Does it need to be a nested 
tuple?

public func forEach(_ body: ((key: Key, value: Value)) throws -> Void) rethrows


> On May 24, 2017, at 12:12 PM, Tony Parker via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> Hi everyone,
> 
> We received a pull request in swift-corelibs-foundation which is apparently 
> in response to a language change for SE-0110.
> 
> It turns this perfectly reasonable code:
> 
> -        self.forEach { (keyItem, valueItem) in
> 
> into this:
> 
> 
> +        self.forEach { (arg) in
> +            let (keyItem, valueItem) = arg
> 
> Is that really the design pattern we want to encourage? What was wrong with 
> the previous code?
> 
> (https://github.com/apple/swift-corelibs-foundation/pull/995/files 
> <https://github.com/apple/swift-corelibs-foundation/pull/995/files>)
> 
> - Tony
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution@swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to