<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 Feb 9, 2016, at 11:50 AM, Jacob Bandes-Storch 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 dir="ltr" class="">I think I like this direction in general. It feels more natural to have the preposition in the label than outside the parenthesis (and it's worth keeping the preposition because it improves clarity in most cases).<div class=""><br class=""></div><div class="">Here are some strange examples which need tweaking:</div><div class=""><br class=""></div><div class=""><div class="">&nbsp; &nbsp; &nbsp;+ func accountType(withAccountTypeIdentifier typeIdentifier: String!) -&gt; ACAccountType!</div></div><div class=""><br class=""></div><div class="">Probably should just be "withIdentifier”.</div></div></div></blockquote><div><br class=""></div><div>Interesting! I’ll have to think about this; it might just be a special case. I haven’t seen this issue come up before.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class=""><div class="">&nbsp; &nbsp; &nbsp;+ func comparePositionInDecodeOrderWithPosition(of cursor: AVSampleCursor) -&gt; ComparisonResult</div></div><div class=""><br class=""></div><div class="">I would suggest comparePositionInDecodeOrder(withPositionOf cursor: AVSampleCursor). Tricky because there are two prepositions.</div></div></div></blockquote><div><br class=""></div>Yeah. Our current heuristics produce:</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>func comparePositionInDecodeOrder(positionOf cursor: AVSampleCursor) -&gt; ComparisonResult</div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class=""><div class="">&nbsp; &nbsp; &nbsp; func componentsPassingTest(testHandler: (AVAudioUnitComponent, UnsafeMutablePointer&lt;ObjCBool&gt;) -&gt; Bool) -&gt; [AVAudioUnitComponent]</div><div class="">&nbsp;- &nbsp; &nbsp;func componentsMatching(desc: AudioComponentDescription) -&gt; [AVAudioUnitComponent]</div><div class="">&nbsp;+ &nbsp; func components(matching desc: AudioComponentDescription) -&gt; [AVAudioUnitComponent]</div></div><div class=""><br class=""></div><div class="">Should "passingTest" become the first label?</div></div></div></blockquote><div><br class=""></div>Yes, thanks!</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/apple/swift-3-api-guidelines-review/commit/ba288337414c998fa358312e22c9b2660dd334e4" class="">https://github.com/apple/swift-3-api-guidelines-review/commit/ba288337414c998fa358312e22c9b2660dd334e4</a></div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><div class="">&nbsp; &nbsp; &nbsp;- &nbsp;class func exportPresetsCompatibleWith(asset: AVAsset) -&gt; [String]</div><div class="">&nbsp; &nbsp; &nbsp;+ &nbsp;class func exportPresetsCompatible(withAsset asset: AVAsset) -&gt; [String]</div></div><div class=""><br class=""></div><div class="">This is not an improvement. I'd suggest exportPresets(compatibleWith asset: AVAsset), but that doesn't really fit under the current rules. Maybe a special case for [noun][adjective][preposition]?<br class=""></div></div></div></blockquote><div><br class=""></div><div>I did it in a different way, here:</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/apple/swift-3-api-guidelines-review/commit/fd70e0e4fa026843ab6570d1b2d46a4cbfd13974" class="">https://github.com/apple/swift-3-api-guidelines-review/commit/fd70e0e4fa026843ab6570d1b2d46a4cbfd13974</a></div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class=""><div class="">&nbsp; &nbsp; - &nbsp;func compatibleTrackFor(compositionTrack: AVCompositionTrack) -&gt; AVAssetTrack?</div><div class="">&nbsp; &nbsp; + &nbsp;func compatibleTrack(forCompositionTrack compositionTrack: AVCompositionTrack) -&gt; AVAssetTrack?</div></div><div class=""><br class=""></div><div class="">Does this indicate that some other suffix-matching rules are no longer being applied? I'd have expected compatibleTrack(for compositionTrack: AVCompositionTrack). I also see other examples like renewCredentials(forAccount account: ACAccount, …).</div></div></div></blockquote><div><br class=""></div>There was a ban on leaving “vacuous” argument labels like “for” or “with”, but it doesn’t make sense now. Addressed in</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/apple/swift-3-api-guidelines-review/commit/aaec8d0fe9cf82cd6f4088721cf8968a6ac69164" class="">https://github.com/apple/swift-3-api-guidelines-review/commit/aaec8d0fe9cf82cd6f4088721cf8968a6ac69164</a></div><div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class=""><div class="">&nbsp; &nbsp; &nbsp; func createSampleBufferFor(request: AVSampleBufferRequest) -&gt; CMSampleBuffer</div></div><div class=""><br class=""></div><div class="">Why wasn't this changed?</div></div></div></blockquote><div><br class=""></div><div>Similar issue to the rule above. It’s fixed now to&nbsp;</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>func createSampleBuffer(for request: AVSampleBufferRequest) -&gt; CMSampleBuffer</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class=""><div class="">&nbsp; &nbsp; &nbsp; - &nbsp;class func typeOf(property property: String!) -&gt; ABPropertyType</div><div class="">&nbsp; &nbsp; &nbsp; + &nbsp;class func type(ofProperty property: String!) -&gt; ABPropertyType</div></div><div class=""><br class=""></div><div class="">I don't really like either of these. Maybe we need special rules for "of” ?</div></div></div></blockquote><div><br class=""></div><div>Handled in the subsequent discussion ;)</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class=""><br class=""></div><div class="">If anyone else is worried about special cases, I just looked this up: there's a clang __attribute__((swift_name("x"))), or NS_SWIFT_NAME(x), which can be used to expose Obj-C methods to Swift with particular custom names.</div></div></div></blockquote><br class=""></div><div>Yes, generalizing the swift_name attribute to allow arbitrary renaming is one of specified steps to implementing SE-0005, so we can deal with special cases and bad translations.</div><div><br class=""></div><div>Thanks!</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>- Doug</div><div><br class=""></div></body></html>