<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></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 22 Feb 2017, at 13:19, Derrick Ho <<a href="mailto:wh1pch81n@gmail.com" class="">wh1pch81n@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">I've read the pitch, but it isn't clear what the ask is or what benefit it would give.</div></blockquote><br class=""></div><div>The purpose of the feature is to enable selection of identically named methods with similar signatures. This came up in the protocol-oriented integers debate on the ability to have arithmetic methods with and without overflow. Like so:</div><div><br class=""></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>protocol IntegerArithmetic {</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>func adding(_ other:Self) -> Self</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>func adding(_ other:Self, reportingOverflow) -> (Self, Bool)</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</font></div><div><font face="Monaco" class=""><br class=""></font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var a = 2, b = 3</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let resultWithoutOverflow = a.adding(b)</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let resultWithOverflow = a.adding(b, reportingOverflow)</font></div><div><br class=""></div><div>Here we have two different methods, one reporting overflow and one without, using the label to enable selection, rather than having to have an addingWithOverflow() method or similar.</div><div><br class=""></div><div>Currently the alternative is to do something like:</div><div><br class=""></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>enum ReportingOverflow { case .reportingOverflow }</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>protocol IntegerArithmetic {</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space: pre;">                </span>func adding(_ other:Self) -> Self</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space: pre;">                </span>func adding(_ other:Self, _) -> (Self, Bool)</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}</font></div><div><font face="Monaco" class=""><br class=""></font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var a = 2, b = 3</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let resultWithoutOverflow = a.adding(b)</font></div><div><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let resultWithOverflow = a.adding(b, .reportingOverflow)</font></div><div><br class=""></div><div>Basically the ability to use the label for method selection is an alternative to either defining an enum as above, or having to use a different method name.</div></body></html>