<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div><span></span></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>Reply below.<br><br>Sent from my iPhone</div><div><br>On 24 Jan 2016, at 00:06, Charles Constant via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><div dir="ltr"><br><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"><span style="font-size:13px">but what I found was that </span><span style="font-size:13px">my APIs generally fell in line naturally with the defaults. </span> </blockquote><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"><span style="font-size:13px">And when </span><span style="font-size:13px">they didn't, looking for a way to take advantage of the defaults often<br></span><span style="font-size:13px">led to a better API</span></blockquote><div><span style="font-size:13px"><br></span></div><div>I'm not sure I follow this. A change would result in:</div><div><br></div><div><div><span style="font-size:13px">Pros:</span></div><div><span style="font-size:13px">- the rule of "least surprise"</span></div><div><span style="font-size:13px">- developers can edit function definitions more quickly </span></div></div><div><br></div><div>Cons:</div><div>- one extra character (i.e.: from "<i>foo: Int</i>" to "<i>_ foo: Int</i>")</div><div><span style="font-size:13px">- one missed opportunity to set an example of "good </span><span style="font-size:13px">style</span><span style="font-size:13px">"</span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px">Am I missing something?</span></div><div><br></div></div></div></blockquote><div><br></div><div>One extra character?</div><div><br></div><div>With our current Objective-C style, we need to repeat at least one word and often need to include "with", "by", "using", etc. to make it read nicely.</div><div><br></div><div>Compare:</div><div><br></div><div>1.</div><div>splitWithSeparator(_ separator: ...</div><div><br></div><div>2.</div><div>split(separator: ...</div><div><br></div><div>The first form repeats "separator" twice and needs "with". And then there's <span style="background-color: rgba(255, 255, 255, 0);">(as you mentioned) </span>the underscore and the space character. In short, tons of crap.</div><div><br></div><div>R+</div><br><blockquote type="cite"><div><div dir="ltr"><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px"><br></span></div><div><span style="font-size:13px"><br></span></div></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></div></body></html>