<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 30, 2016 at 7:02 PM, Scott James Remnant <span dir="ltr">&lt;<a href="mailto:scott@netsplit.com" target="_blank">scott@netsplit.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><br><div><span class=""><blockquote type="cite"><div class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Is there an example of two functions, obeying the naming guidelines, which have different argument labels (not parameter names) for parameters of the same type, where it makes sense to cross-call them?</blockquote><div><br></div><div>Sure there are. For example, `adding(_:)` and `multiplied(by:)` in the new Integer protocol.</div></div></blockquote><div><br></div></span><div>These have quite different results!</div></div></div></blockquote><div><br></div><div>Of course they have different results. What&#39;s the point of two different functions that yield the same results? I don&#39;t see your point here. Anywhere I can supply `adding(_:)` as a predicate, I expect to be able to supply `multiplied(by:)`. Both of these methods take one number and return another; there is nothing about the label `by` inherent to what the latter method does; it&#39;s entirely an accident of the English language.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br></div><div>I’m pretty convinced that Swift shouldn’t implicitly allow you to assign multiplied(by:) to the same member as you could assign adding(_:) - explicit is fine, with some syntax e.g. through a closure, but not implicit!</div></div></div></blockquote><div><br></div><div>But adding(_:) and subtracting(_:) are OK? The point is, with Swift guidelines, argument labels can differ due to the vagaries of the English language; it is not a proxy for whether two functions are &quot;not very different,&quot; &quot;somewhat different,&quot; or &quot;very different.&quot;</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><br></div><div>To correct my goofy pre-coffee not-quite-following-the-naming-guidelines suggestion, that would be equivalent of allowing these two to be interchangeable:</div><div><br></div><div>  func drawLineTo(x: Float, y: Float)</div><div>  func drawLineWith(angle: Float, distance: Float)</div><div><br></div><div>Which is clearly not something you would expect to be allowed implicitly.</div></div></div></blockquote><div><br></div><div>Why not? It is not clear to me.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>I’m definitely for the concept of the proposal that this is inconsistent, but I’m also definitely for making this explicitly disallowed everywhere, not allowed everywhere.<br></div><div><br></div><div>I think Erica makes a good point about syntax too, we’ve been assuming:</div><div><br></div><div>  // compatible types</div><div>  var x = drawLineTo</div><div>  x = drawLineWith</div><div><br></div><div>but really this isn’t Swifty syntax, the full argument labels provide more clarity here; and I’d even be in favor of disallowing the above shortening.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Scott</div></font></span></div></blockquote></div><br></div></div>