[swift-evolution] Revisiting SE-0110

Bouke Haarsma bouke at haarsma.eu
Sun May 28 03:30:31 CDT 2017


On 2017-05-24 19:12:14 +0000, Tony Parker via swift-evolution said:

> 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)
> 
> - Tony
> 
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

I'm no language designer, nor an compiler engineer. However we should 
definitely be able to use the former expression as it has better 
readability over the latter IMO.

-- 
-Bouke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170528/028ac8fd/attachment.html>


More information about the swift-evolution mailing list