<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1504.83">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 18.0px; font: 16.0px Helvetica; color: #011892; -webkit-text-stroke: #000000}
p.p4 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 18.0px; font: 16.0px Helvetica; color: #011892; -webkit-text-stroke: #000000; min-height: 19.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 19.0px; font: 16.0px Helvetica; color: #011892; -webkit-text-stroke: #000000}
p.p6 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 18.0px; font: 16.0px Helvetica; color: #011892; -webkit-text-stroke: #0000ee}
p.p7 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 14.0px; font: 12.0px Helvetica; color: #011892}
p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p9 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica}
p.p10 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p11 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #929292}
span.s1 {font-kerning: none}
span.s2 {font-kerning: none; -webkit-text-stroke: 0px #000000}
span.s3 {text-decoration: underline ; font-kerning: none; -webkit-text-stroke: 0px #0000ee}
</style>
</head>
<body>
<p class="p1">On 2017-05-24 19:12:14 +0000, Tony Parker via swift-evolution said:</p>
<p class="p2"><br></p>
<p class="p3"><span class="s1">Hi everyone,</span></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p3"><span class="s1">We received a pull request in swift-corelibs-foundation which is apparently in response to a language change for SE-0110.</span></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p3"><span class="s1">It turns this perfectly reasonable code:</span></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p5"><span class="s1">- self.forEach { (keyItem, valueItem) in</span></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p3"><span class="s1">into this:</span></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p5"><span class="s1">+ self.forEach { (arg) in</span></p>
<p class="p5"><span class="s1">+ let (keyItem, valueItem) = arg</span></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p3"><span class="s1">Is that really the design pattern we want to encourage? What was wrong with the previous code?</span></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p6"><span class="s2">(<a href="https://github.com/apple/swift-corelibs-foundation/pull/995/files"><span class="s3">https://github.com/apple/swift-corelibs-foundation/pull/995/files</span></a>)</span></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p3"><span class="s1">- Tony</span></p>
<p class="p4"><span class="s1"></span><br></p>
<p class="p7">_______________________________________________</p>
<p class="p7">swift-evolution mailing list</p>
<p class="p7">swift-evolution@swift.org</p>
<p class="p7">https://lists.swift.org/mailman/listinfo/swift-evolution</p>
<p class="p8"><br></p>
<p class="p9">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.</p>
<p class="p10"><br></p>
<p class="p11">--<span class="Apple-converted-space"> </span></p>
<p class="p11">-Bouke</p>
</body>
</html>