<div dir="ltr">Hello Swift users,<div><br></div><div>I have a question about capturing references to initializers. You can do the following right now:</div><div><br></div><div><div>struct Foo {</div><div>    let number : Int</div><div>    // This type has a single initializer</div><div>    init() {</div><div>        number = 10</div><div>    }</div><div>}</div><div><br></div><div>let a  = Foo.init  // a&#39;s type: () -&gt; Foo</div></div><div><br></div><div>So far so good. Now, let&#39;s add in a second initializer:</div><div><br></div><div><div>extension Foo {</div><div>    init(customNumber: Int) {</div><div>        number = customNumber</div><div>    }</div><div>}</div></div><div><br></div><div>Now, if you want to capture a reference to one of the initializers, you can annotate the variable with the explicit function type:</div><div><br></div><div><div>let a : () -&gt; Foo = Foo.init</div><div>let b : Int -&gt; Foo = Foo.init</div></div><div><br></div><div>My question involves the case where you have multiple initializers that take the same arguments and types. How would you capture initializers then?</div><div><br></div><div><div>extension Foo {</div><div>    init(numberToInc: Int) {</div><div>        number = numberToInc + 1</div><div>    }</div><div>}</div></div><div><br></div><div>How do I capture a reference to the numberToInc: initializer, versus the customNumber: initializer?</div><div><br></div><div>Best regards,</div><div>Austin</div></div>