<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 27, 2017, at 1:48 PM, Adrian Zubarev 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=""><div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><ul style="margin: 15px 0px;" class=""><li style="margin: 15px 0px; -webkit-margin-before: 0px;" class=""><p style="margin: 15px 0px; -webkit-margin-before: 0px;" class="">Assuming we’ll get that functionality, both<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal; -webkit-margin-before: 0px;" class="">var</code><span class="Apple-converted-space">&nbsp;</span>and<span class="Apple-converted-space">&nbsp;</span><code style="font-family: Menlo, Consolas, 'Liberation Mono', Courier, monospace; font-size: 10pt; border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; background-color: rgb(248, 248, 248); color: inherit; border: 1px solid rgb(234, 234, 234); margin: 0px 2px; padding: 0px 5px; word-break: normal; word-wrap: normal;" class="">let</code><span class="Apple-converted-space">&nbsp;</span>should satisfy the protocol requirements right?</p></li></ul></div></div></blockquote>In theory, there’s no reason not to allow that.</div><div><br class=""><blockquote type="cite" class=""><div class="bloop_markdown" style="font-family: Helvetica, Arial; font-size: 13px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: rgb(254, 254, 254);"><ul style="margin: 15px 0px;" class=""><li style="margin: 15px 0px;" class=""><p style="margin: 15px 0px; -webkit-margin-before: 0px;" class="">If it is valid, could we potentially get optional functions in pure Swift as well?</p><div class=""><br class=""></div></li></ul></div></blockquote>I mean, you can already do this:</div><div><br class=""></div><div>protocol P {</div><div>&nbsp; var optionalRequirement: ((Int) -&gt; ())? { get }</div><div>}</div><div><br class=""></div><div>extension P {</div><div>&nbsp; // “default implementation"</div><div>&nbsp; var optionalRequirement: ((Int) -&gt; ())? { return nil }</div><div>}</div><div><br class=""></div><div>struct A : P {}</div><div><br class=""></div><div>struct B : P {</div><div>&nbsp; let optionalRequirement: ((Int) -&gt; ())? = { (x: Int) in print(x) }</div><div>}</div><div><br class=""></div><div>But it’s kind of tacky.</div><div><br class=""></div><div>If you think about it, “optional requirement” is an oxymoron. What’s your use-case?</div><div><br class=""></div><div>Slava</div></body></html>