<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 11, 2016, at 16:01 , Dave Abrahams <<a href="mailto:dabrahams@apple.com" class="">dabrahams@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 11, 2016, at 2:57 PM, Jordan Rose <<a href="mailto:jordan_rose@apple.com" class="">jordan_rose@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 11, 2016, at 13:30 , Dave Abrahams <<a href="mailto:dabrahams@apple.com" class="">dabrahams@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 11, 2016, at 11:27 AM, Joe Groff <<a href="mailto:jgroff@apple.com" class="">jgroff@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="font-family: AvenirNext-Regular; font-size: 15px; 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;" class=""><blockquote type="cite" class=""><div class=""><br class="Apple-interchange-newline">On Mar 11, 2016, at 11:20 AM, Jordan Rose via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Mar 10, 2016, at 15:34 , Dave Abrahams via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">on Wed Mar 09 2016, Jordan Rose <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class=""><br class=""><blockquote type="cite" class="">This is my concern too. Our guidelines often lead to the first<br class="">parameter having a label, but usually that name isn't the same as the<br class="">name of the parameter—one's a preposition, the other's a noun. I'm<br class="">pretty sure the common case is still unlabeled.<span class="Apple-converted-space"> </span><br class=""></blockquote><br class="">It's about 50/50 (slight edge to labeled first parameters) in the<br class="">imported Cocoa APIs.<br class=""></div></blockquote></div><br class=""><div class="">If it's easy to get these numbers, how many of the first parameters have the same label as the parameter name?</div></div></div></blockquote><br class=""></div><div style="font-family: AvenirNext-Regular; font-size: 15px; 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;" class="">If you're going to measure that, you should also measure it for second, third, ..., Nth parameters too for comparison.</div></div></blockquote><br class=""></div><div class="">Anyone who wants to measure is free to do so: simple regexps and wc generally work for this purpose.</div><div class=""><br class=""></div><div class=""><a href="https://github.com/apple/swift-3-api-guidelines-review/tree/swift-3/Platforms" class="">https://github.com/apple/swift-3-api-guidelines-review/tree/swift-3/Platforms</a></div></div></div></blockquote><br class=""></div><div class="">…in retrospect, probably more of the Cocoa names would match up if they had this shorthand before:</div><div class=""><br class=""></div><div class=""><table class="js-file-line-container highlight tab-size" data-tab-size="8" style="box-sizing: border-box; border-collapse: collapse; border-spacing: 0px; tab-size: 8; color: rgb(51, 51, 51); font-family: Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 13px;"><tbody style="box-sizing: border-box;" class=""><tr style="box-sizing: border-box;" class=""></tr><tr style="box-sizing: border-box;" class=""><td id="LC30" class="js-file-line blob-code-inner blob-code" style="box-sizing: border-box; padding: 0px 10px; position: relative; vertical-align: top; overflow: visible; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; word-wrap: normal; white-space: pre;"> <span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">func</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">beginSheetModal</span>(<span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">for</span> <span class="pl-smi" style="box-sizing: border-box;">window</span>: NSWindow, <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">modalDelegate</span> <span class="pl-smi" style="box-sizing: border-box;">delegate</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">AnyObject</span>?, <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">didEnd</span> <span class="pl-smi" style="box-sizing: border-box;">didEndSelector</span>: Selector, <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">contextInfo</span> <span class="pl-smi" style="box-sizing: border-box;">contextInfo</span>: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">UnsafeMutablePointer</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);"><</span><span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Void</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">></span>)</td></tr><tr style="box-sizing: border-box;" class=""><td id="L31" class="blob-num js-line-number" data-line-number="31" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; line-height: 18px; text-align: right; white-space: nowrap; vertical-align: top; cursor: pointer; -webkit-user-select: none; border-style: solid; border-color: rgb(238, 238, 238); border-width: 0px 1px 0px 0px;"></td></tr></tbody></table><br class=""></div><div class="">- for/window is a true difference</div><div class="">- modalDelegate/delegate is just convenience inside the method; it could have easily been modalDelegate/modalDelegate</div><div class="">- didEnd/didEndSelector actually <i class="">does</i> match up in the original; the importer has (correctly) changed it to not match</div><div class="">- contextInfo/contextInfo is a match</div></div></div></blockquote><div class=""><br class=""></div>Sorry, I don’t know what you are trying to assert here. Which shorthand? We haven’t introduced any, and nobody’s proposing to add one.</div></div></div></blockquote><br class=""></div><div>The "shorthand" of providing a single name that is used both as an argument label and a parameter name. (Sorry for being unclear about that.) Objective-C has no way to do that, and so there's no incentive to make selector pieces exactly match parameter names.</div><div><br class=""></div><div>Jordan</div><br class=""></body></html>