<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m already not a huge fan of the complexity introduced with memberwise initializers, but see some usefulness. But I see much less use in parameter forwarding.<div class="">I’m very afraid of all this "syntactic sugar” and would prefer a simpler language even if it means a little bit more typing.<br class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 11 Jan 2016, at 19:26, Félix Cloutier via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class="">On Jan 10, 2016, at 10:17 PM, Félix Cloutier &lt;<a href="mailto:felixcca@yahoo.ca" class="">felixcca@yahoo.ca</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I was okay with memberwise initializers but this pushes me beyond my comfort zone.</div></div></blockquote><div class=""><br class=""></div><div class="">Hi Felix, can you elaborate on why? &nbsp;This feature is quite similar to features in other languages that are generally considered to be quite useful.</div><div class=""><br class=""></div><div class="">/* snip */</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">I don't find it similar to how dynamic languages do parameter packing, and not useful in the same conditions. In Python, you'll use parameter packing and unpacking mostly with functions that receive variable parameters. Swift's variadic functions don't work like that. It's strictly less powerful and less needed than C++'s perfect forwarding because Swift doesn't have lvalue (or rvalue) references. Besides, perfect forwarding is mostly used when you don't know the call target, and the parameter packing proposal requires you to know it.</div><div class=""><br class=""></div><div class="">The fact that there are forwarding solutions in other languages doesn't mean that Swift has the problems that these solutions are trying to address.</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I'm not sold on the usefulness of the feature. Memberwise initializers save you from typing out the init parameters and assignments to each field. Argument forwarding saves you from spelling out the parameters *more than once* (because you still need to type them out for the receiving function) and from *one call*. While I've been annoyed at initializers, I don't think I've ever been particularly annoyed at forwarding functions.</div></div></div></blockquote><div class=""><br class=""></div><div class="">Both features save approximately the same amount of code. &nbsp;They save explicit declaration of parameters as well as a single action with the provided argument.</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">Here's a 4-field example for memberwise initializers:</div><div class=""><br class=""></div><div class=""><div class=""></div></div><blockquote type="cite" class=""><div class=""><div class="">struct Foo {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var bar: Int</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var baz: Int</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var frob: Int</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var nicate: Int</div><div class="">}</div></div></blockquote><div class=""><br class=""></div><div class="">it's either gonna be "memberwise init(...) {}" (23 chars) or:</div><div class=""><br class=""></div><div class=""><div class=""></div><blockquote type="cite" class=""><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>init(bar: Int, baz: Int, frob: Int, nicate: Int) {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>self.bar = bar</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>self.baz = baz</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>self.frob = frob</div><div class=""><span class="Apple-tab-span" style="white-space:pre">                </span>self.nicate = nicate</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</div></blockquote></div><div class=""><br class=""></div><div class="">120 characters excluding tabs, and with very short insignificant names. That's like six times less code for the same thing.</div><div class=""><br class=""></div><div class="">Let's have a 4-parameter method:</div><div class=""><br class=""></div><div class=""><div class=""></div><blockquote type="cite" class=""><div class="">class Foo {</div><div class=""><span class="Apple-tab-span" style="white-space:pre">        </span>func foo(bar: Int, baz: Int, frob: Int, nicate: Int) { /* snip */ }</div><div class="">}</div></blockquote></div><div class=""><br class=""></div><div class="">Now this is either going to be "func bar(...fooPack) { foo(bar: 1, ...fooPack) }" (48 chars) or "func bar(baz: Int, frob: Int, nicate: Int) { foo(bar: 1, baz: baz, frob: frob, nicate: nicate) }" (96 chars).</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">More importantly, forwarding is a general purpose feature that when combined with partial initializers and property lists can support much more expressive memberwise initialization than contained in the initial proposal. &nbsp;There was quite a bit of discussion about both the limitations of the memberwise initialization proposal as well as the specificity of it to exactly one use case (memberwise initialization). &nbsp;Forwarding plays a role in removing the limitations while building on a more general foundation.</div></div></div></div></blockquote><div class=""><br class=""></div><div class="">I disagree with the critics and I don't support these other proposals. In my opinion, the objections you're referring to were theoretical-style "this doesn't solve the General Problem". The vast majority of users don't need the General Problem to be solved, and if a specific solution gets us 95% of the way there with little disturbance, it's probably best to take it and leave behind the major changes required for the remaining 5%.</div><div class=""><br class=""></div><div class="">The question here is whether memberwise initialization gets us 95% of the way there. I think it does, and I'm gonna need real code and user feedback to change my mind. This is unlikely to happen before memberwise initializers ship.</div><div class=""><br class=""></div><div class="">I really think that we should wait to see how memberwise initialization plays out before laying out plans to extend it.</div><div class=""><br class=""></div><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">At this point, I feel that a competent macro system is a better investment than adding distinct bits of automation wherever there appears to be repetition.<br class=""></div></div></div></blockquote><div class=""><br class=""></div><div class="">I agree that a macro system would be great, but it is explicitly not in scope for Swift 3. &nbsp;It would also not be capable of implementing parameter forwarding as described in this proposal.</div><div class=""><br class=""></div><div class="">I hope you will consider discussing this further.</div><div class=""><br class=""></div><div class="">Matthew</div><br class=""><blockquote type="cite" class=""><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><div class="">
<br class="Apple-interchange-newline"><span style="font-family: 'Lucida Grande'; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">Félix</span>
</div>

<br class=""><div class=""><blockquote type="cite" class=""><div class="">Le 10 janv. 2016 à 22:44:36, Matthew Johnson via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">I have always considered the Flexible Memberwise Initialization proposal to be just a first step (as evidenced by the many future enhancements it discussed). &nbsp;Its review has inspired new ideas and helped to shape my vision of the best long-term solution. &nbsp;My final thoughts about the review can be found here:&nbsp;<a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160104/006176.html" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160104/006176.html</a></div><div class=""><br class=""></div><div class="">Parameter forwarding is the first in a series of three proposals describing general features that can work together to form a complete solution.</div><div class=""><br class=""></div><div class=""><div class="">The proposal drafts can be found at the following links:</div><div class=""><br class=""></div><div class="">*&nbsp;<b class="">Parameter forwarding:</b>&nbsp;<a href="https://github.com/anandabits/swift-evolution/blob/parameter-forwarding/proposals/NNNN-parameter-forwarding.md" class="">https://github.com/anandabits/swift-evolution/blob/parameter-forwarding/proposals/NNNN-parameter-forwarding.md</a></div><div class="">*&nbsp;<b class="">Partial initializers:</b>&nbsp;<a href="https://github.com/anandabits/swift-evolution/blob/partial-initializers/proposals/NNNN-partial-initializers.md" class="">https://github.com/anandabits/swift-evolution/blob/partial-initializers/proposals/NNNN-partial-initializers.md</a></div><div class="">*&nbsp;<b class="">Property lists:</b>&nbsp;<a href="https://github.com/anandabits/swift-evolution/blob/property-lists/proposals/NNNN-property-lists.md" class="">https://github.com/anandabits/swift-evolution/blob/property-lists/proposals/NNNN-property-lists.md</a></div></div><div class=""><br class=""></div><div class="">Matthew</div><div class=""><h1 id="parameterforwarding" style="font-size: 37px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Parameter Forwarding</h1><ul style="margin-top: 21px; margin-bottom: 21px; padding-left: 1.5em; color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; font-size: 15px;" class=""><li style="font-size: 17px;" class="">Proposal:&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/NNNN-parameter-forwarding.md" style="color: rgb(13, 110, 161); text-decoration: none; transition: color 0.2s ease-in-out; -webkit-transition: color 0.2s ease-in-out;" class="">SE-NNNN</a></li><li style="font-size: 17px;" class="">Author(s):&nbsp;<a href="https://github.com/anandabits" style="color: rgb(13, 110, 161); text-decoration: none; transition: color 0.2s ease-in-out; -webkit-transition: color 0.2s ease-in-out;" class="">Matthew Johnson</a></li><li style="font-size: 17px;" class="">Status:&nbsp;<strong style="line-height: 1;" class="">Awaiting review</strong></li><li style="font-size: 17px;" class="">Review manager: TBD</li></ul><h2 id="introduction" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Introduction</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">This feature introduces an automatic parameter forwarding mechanism.</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">Swift-evolution thread:&nbsp;<a href="https://lists.swift.org/pipermail/swift-evolution" style="color: rgb(13, 110, 161); text-decoration: none; transition: color 0.2s ease-in-out; -webkit-transition: color 0.2s ease-in-out;" class="">Proposal Draft: parameter forwarding</a></p><h2 id="motivation" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Motivation</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">There are many cases where a function declares parameters simply for the purpose of forwarding the provided arguments to another function. This results in reduntant parameter specifications that make code less clear and less readable by obscuring the simple forwarding that is actually happening.</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">This feature will be especially useful in initializers such as:</p><ul style="margin-top: 21px; margin-bottom: 21px; padding-left: 1.5em; color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; font-size: 15px;" class=""><li style="font-size: 17px;" class="">Convenience initializers that foward parameters directly to a designated initializer</li><li style="font-size: 17px;" class="">Designated initializers that foward parameters directly to a super initializer</li><li style="font-size: 17px;" class="">Designated initializers that foward parameters directly to a member initializer, perhaps in a composition-based design</li><li style="font-size: 17px;" class="">If the partial initilaizer proposal is accepted, designated initializers that forward parameters to one or more partial initializers</li></ul><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">NOTE: I haven’t had time to think too much aboue use cases beyond initialization. Please share examples and I will add them to this proposal.</p><h2 id="proposedsolution" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Proposed solution</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">The proposed solution is to introduce an automatic parameter forwarding mechansim. It allows users to provide direct arguments for some parameters while forwarding others.</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">The basic mechanism looks like this:</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, f: Float = <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...fooParams)</span></span> {
    foo(i: <span class="hljs-number" style="color: rgb(0, 153, 153);">32</span>, ...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(s: String, f: Float = <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> {
    foo(i: <span class="hljs-number" style="color: rgb(0, 153, 153);">32</span>, s: s, f: f, d: d, b: b)
}</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">Some things to note about the syntax:</p><ol style="margin-top: 21px; margin-bottom: 21px; padding-left: 1.5em; color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; font-size: 15px;" class=""><li style="font-size: 17px;" class=""><code style="line-height: 1;" class="">...fooParams</code>&nbsp;is a placeholder introduced with&nbsp;<code style="line-height: 1;" class="">...</code>&nbsp;and followed by an identifier.</li><li style="font-size: 17px;" class="">In the signature it can be placed anywhere in the parameter list.</li><li style="font-size: 17px;" class="">At the call site, it must appear at the end of the argument list.</li><li style="font-size: 17px;" class="">The placeholder matches the parameters not directly provided including their external label and default value if those exist.</li><li style="font-size: 17px;" class="">Parameters corresponding to the matched parameters are synthesized by the compiler where the placeholder exists in the parameter list, including the default argument if one exists.</li><li style="font-size: 17px;" class="">The identifier portion of the placeholder may be omitted if only one set of forwarded parameters exist within the function.</li></ol><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">Additional details will be introduced with a corresponding example.</p><h3 id="omittingtheplaceholderidentifier" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Omitting the placeholder identifier</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">The above example can be written more concisely by omitting the placeholder identifier.</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, f: Float = <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...)</span></span> {
    foo(i: <span class="hljs-number" style="color: rgb(0, 153, 153);">32</span>, ...)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(s: String, f: Float = <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> {
    foo(i: <span class="hljs-number" style="color: rgb(0, 153, 153);">32</span>, s: s, f: f, d: d, b: b)
}</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">NOTE: If the community feels strongly that the identifier should be required I am willing to do so.</p><h3 id="multipleforwardedparametersets" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Multiple forwarded parameter sets</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">It is possible for a single function to forward more than one set of parameters:</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, f: Float = <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>)</span></span> { }
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo2</span><span class="hljs-params">(d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...fooParams, ...foo2Params)</span></span> {
    foo2(...foo2Params)
    foo(i: <span class="hljs-number" style="color: rgb(0, 153, 153);">32</span>, ...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(s: String, f: Float = <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> {
    foo(i: <span class="hljs-number" style="color: rgb(0, 153, 153);">32</span>, s: s, f: f, d: d, b: b)
}</code></pre><h3 id="directarguments" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Direct arguments</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">Any direct arguments provided in the forwarding call must follow the usual argument ordering rules, with the only exception being that it is allowed to omit some arguments that would normally be required. When the compiler performs forwarding it will insert forwarded arguments in the correct location.</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, f: Float = <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> { }

<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...fooParams)</span></span> {
    <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// error: `i` must precede `s` in the argument list</span>
    foo(s: <span class="hljs-string" style="color: rgb(221, 17, 68);">"hello"</span>, i: <span class="hljs-number" style="color: rgb(0, 153, 153);">32</span>, ...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...fooParams)</span></span> {
    foo(i: <span class="hljs-number" style="color: rgb(0, 153, 153);">32</span>, f: <span class="hljs-number" style="color: rgb(0, 153, 153);">0</span>, ...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(s s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> {
    foo(i: <span class="hljs-number" style="color: rgb(0, 153, 153);">32</span>, s: s, f: <span class="hljs-number" style="color: rgb(0, 153, 153);">0</span>, d: d, b: b)
}</code></pre><h3 id="multi-forwardingthesameparameters" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Multi-forwarding the same parameters</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">It is allowed to use the same identifier in multiple forwarding calls as long as the signature of the matched parameters matches exactly, including any default values.&nbsp;</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>)</span></span> { }
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">baz</span><span class="hljs-params">(...fooBarParams)</span></span> {
    foo(...fooBarParams)
    bar(...fooBarParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes: </span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">baz</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>)</span></span> {
    foo(i: i, s: s, d: d)
    bar(i: i, s: s, d: d)
}</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">NOTE: This provision might be controversial. If the community doesn’t like it or the implementation is too complex I will remove it.</p><h3 id="unambiguouscall" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Unambiguous call</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">When forwarding parameters to a function that is overloaded the caller must provide enough direct arguments to make the call unambiguous.</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> { }
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, f: Float = <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...fooParams)</span></span> {
    <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// error: ambiguous use of foo</span>
    <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// foo(i: 32, ...fooParams)</span>
    
    <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// ok: `b` makes the call to foo unambiguous</span>
    foo(b: <span class="hljs-literal">true</span>, ...fooParams)
    <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// ok: `f` makes the call to foo unambiguous</span>
    foo(f: <span class="hljs-number" style="color: rgb(0, 153, 153);">24</span>, ...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes: </span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>)</span></span> {
    foo(i: i, s: s, d: d, b: <span class="hljs-literal">true</span>)
    foo(i: i, s: s, d: d, f: <span class="hljs-number" style="color: rgb(0, 153, 153);">24</span>)
}</code></pre><h3 id="defaultvalues" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Default values</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">When forwarding to a function that accepts default values it is possible to explicitly request the default value. This allows for disambiguation and also allows the forwarding function to suppress a defaulted parameter from participating in forwarding without needing to supply a specific value. The&nbsp;<code style="line-height: 1;" class="">default</code>&nbsp;keyword is used to do this.</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">We can modify the previous example to use the defualt values:</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> { }
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, f: Float = <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...fooParams)</span></span> {
    <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// ok: `b` makes the call to foo unambiguous, still uses default value</span>
    foo(b: <span class="hljs-keyword" style="font-weight: bold;">default</span>, ...fooParams)
    <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// ok: `f` makes the call to foo unambiguous, still uses default value</span>
    foo(f: <span class="hljs-keyword" style="font-weight: bold;">default</span>, ...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>)</span></span> {
    foo(i: i, s: s, d: d, b: <span class="hljs-literal">false</span>)
    foo(i: i, s: s, d: d, f: <span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>)
}</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">It is also possible to explicitly request all defaults at once using&nbsp;<code style="line-height: 1;" class="">default...</code>. In this example,&nbsp;<code style="line-height: 1;" class="">foo</code>is not overloaded:</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-params">(i i: Int, s: String, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...fooParams)</span></span> {
    foo(<span class="hljs-keyword" style="font-weight: bold;">default</span>..., ...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(i i: Int, s: String)</span></span> {
    foo(i: i, s: s, d: <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: <span class="hljs-literal">false</span>)
}</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">NOTE: The actual implementation of default arguments looks somewhat different. These examples are intended to communicate the behavior, not the exact details of implementation.</p><h3 id="genericparameters" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Generic parameters</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">If the types of any matched parameters reference any generic type parameters of the forwardee the generic type parameters must also be forwarded, along with any constraints on those generic parameters.&nbsp;</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-generics">&lt;T&gt;</span><span class="hljs-params">(i i: Int, s: String, t: T, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...fooParams)</span></span> {
    foo(...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-generics">&lt;T&gt;</span><span class="hljs-params">(i i: Int, s: String, t: T, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> {
    foo(i: i, s: s, t: t, d: d, b: b)
}</code></pre><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">If a generic parameter is referenced in a constraint that also references a generic parameter that will not be forwarded the constraint is resolved to a concrete type when possible. This may not be possible in all cases. When it is not possible a compiler error will be necessary.</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-generics">&lt;S: SequenceType, T: SequenceType where S.Generator.Element == T.Generator.Element&gt;</span>
    <span class="hljs-params">(s: S, t: T)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-params">(...fooParams)</span></span> {
    foo(t: [<span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>], ...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-generics">&lt;S: SequenceType where S.Generator.Element == Int&gt;</span><span class="hljs-params">(s: S)</span></span> {
    foo(s: s, t: [<span class="hljs-number" style="color: rgb(0, 153, 153);">42</span>])
}</code></pre><h3 id="synthesziedinternalnames" style="color: rgb(17, 17, 17); margin: 21px 0px; font-size: 20px; line-height: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Syntheszied internal names</h3><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">The compiler must ensure that all synthesized parameters have internal names that do not conflict with the internal names of any manually declared parameters. This applies to both generic type parameter names as well as value arguments in the parameter list of the function.</p><pre style="margin-top: 21px; margin-bottom: 21px; tab-size: 4; color: rgb(17, 17, 17); font-size: 15px; background-color: rgb(248, 248, 248);" class=""><code class="swift hljs" style="line-height: inherit; display: block; padding: 0.5em; color: rgb(51, 51, 51); height: auto;"><span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">foo</span><span class="hljs-generics">&lt;T&gt;</span><span class="hljs-params">(i i: Int, s: String, t: T, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> { }

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// user writes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-generics">&lt;T&gt;</span><span class="hljs-params">(t: T, ...fooParams)</span></span> {
    <span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// do something with t</span>
    foo(...fooParams)
}

<span class="hljs-comment" style="color: rgb(153, 153, 136); font-style: italic;">// compiler synthesizes:</span>
<span class="hljs-func"><span class="hljs-keyword" style="font-weight: bold;">func</span> <span class="hljs-title" style="color: rgb(153, 0, 0); font-weight: bold;">bar</span><span class="hljs-generics">&lt;T, InternalCompilerIdentifier&gt;</span><span class="hljs-params">(t: T, i i: Int, s: String, t internalCompilerIdentifier: InternalCompilerIdentifier, d: Double = <span class="hljs-number" style="color: rgb(0, 153, 153);">43</span>, b: Bool = <span class="hljs-literal">false</span>)</span></span> {
    foo(t: t, i: i, s: s, t: internalCompilerIdentifier, d: d, b: b)
}</code></pre><h2 id="detaileddesign" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Detailed design</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">TODO but should fall out pretty clearly from the proposed solution</p><h2 id="impactonexistingcode" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Impact on existing code</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">This is a strictly additive change. It has no impact on existing code.</p><h2 id="alternativesconsidered" style="color: rgb(17, 17, 17); font-size: 27px; line-height: 42px; margin-top: 42px; margin-bottom: 21px; font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif;" class="">Alternatives considered</h2><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">I believe the forwarding mechanism itself is pretty straightforward and any alternatives would be lose functionality without good reason.&nbsp;</p><p style="color: rgb(17, 17, 17); font-family: 'Helvetica Neue', Helvetica, Arial, Verdana, sans-serif; word-wrap: break-word; margin: 1.3125em 0px; font-size: 1.1429em; line-height: 1.3125em;" class="">The placeholder syntax is of course fair game for bikeshedding. I consider anything reasonably clear and concise to be acceptable.</p></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=iRI3beHTe3UxYAHTlV3lA38zIPfHMhyuRzgTmGKV6k6PE08XyqhnW335s7EfoynLnb0RFI23FoJ5evCRSoe08HSSsG6aHPJkERLVoloVv9CZuKKNr0kJqgyyiaVzBhjiZfn-2BetdmRfPMDVc5mNV3QsbWXa78jKmnmumd6MFkpRAxhORq3UfUWCDywp3PNaYscppWoVMp-2FB-2BYo-2BN-2BRRA1ZTgK6DXoBkkXLae-2BtDLv8uY-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div></div></blockquote></div><br class=""></div></div></blockquote></div><br class="">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=nE9rxSXA5G4kxsTVkgv43hXwizS3O2z60WweqomIrdj5jyyVw4J4HSb1RhrrdxclpvmmtXBLSgsZzue6fwc0JE30xj8H3t8MkdCxHbFZjgym5uZnlPE1UJe-2Fzf95nGZIxIkXAth9iUqYMVLd2WPiNyj10x-2FUpxYtVnL8U3zWNIIKP69hZyc1r8oFrA9xDIeFnInLoSvQ3YDB5moUHXuQtXczhoFvZcWota4YkRsw2TM-3D" alt="" width="1" height="1" border="0" style="height:1px !important;width:1px !important;border-width:0 !important;margin-top:0 !important;margin-bottom:0 !important;margin-right:0 !important;margin-left:0 !important;padding-top:0 !important;padding-bottom:0 !important;padding-right:0 !important;padding-left:0 !important;" class="">
</div>
_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></div></div></body></html>