<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=""><div class="">Wouldn’t this be the responsibility of UIKit/AppKit teams to provide extensions that pass the default values?</div><div class=""><br class=""></div><div class="">Russ</div><br class=""><div><blockquote type="cite" class=""><div class="">On Apr 8, 2016, at 10:40 AM, Erica Sadun 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=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Is there a best way to request default values for common Cocoa and Cocoa Touch APIs? <div class="">Now that we're moving to Swift, the language supports defaults and omitted parameters</div><div class="">but the ObjC APIs do not (yet) supply them. </div><div class=""><br class=""><div class="">For example, <font face="Menlo" class="">dismissViewControllerAnimated(flag: true, completion: nil)</font><span style="font-family: Palatino-Roman;" class=""> </span></div><div class=""><span style="font-family: Palatino-Roman;" class="">could become </span><font face="Menlo" class="">dismissAnimated()</font><span style="font-family: Palatino-Roman;" class=""> when default values are available for </span><font face="Menlo" class="">flag</font><span style="font-family: Palatino-Roman;" class=""> and </span><font face="Menlo" class="">completion</font><span style="font-family: Palatino-Roman;" class="">.</span></div><div class=""><span style="font-family: Palatino-Roman;" class="">There's a large-ish class of these boilerplate defaults and it would be nice if there were a way to</span></div><div class=""><span style="font-family: Palatino-Roman;" class="">be able to request them.</span></div><div class=""><span style="font-family: Palatino-Roman;" class=""><br class=""></span></div><div class=""><span style="font-family: Palatino-Roman;" class="">cc'ing in Daniel S whose idea this is.</span></div><div class=""><span style="font-family: Palatino-Roman;" class=""><br class=""></span></div><div class=""><span style="font-family: Palatino-Roman;" class="">Thanks, -- E</span></div></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">https://lists.swift.org/mailman/listinfo/swift-evolution<br class=""></div></blockquote></div><br class=""></body></html>