<div dir="ltr">Proposed: <a href="https://github.com/apple/swift-evolution/pull/44">https://github.com/apple/swift-evolution/pull/44</a><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>Jacob<br></div></div></div></div>
<br><div class="gmail_quote">On Tue, Dec 8, 2015 at 4:30 PM, Jordan Rose <span dir="ltr"><<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>></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"><span class=""><br><div><blockquote type="cite"><div>On Dec 8, 2015, at 16:03, Jacob Bandes-Storch <<a href="mailto:jtbandes@gmail.com" target="_blank">jtbandes@gmail.com</a>> wrote:</div><br><div><div dir="ltr">Thanks, Jordan. I'll write one up tonight.<div><br></div><div>Should it use UnsafePointer or UnsafeMutablePointer? I've seen that C APIs frequently get imported as UnsafeMutablePointer, when it doesn't necessarily match the semantics of the API. Is that just the default?</div></div></div></blockquote></div><br></span><div>Either way we're going to lose in some cases. We can probably make the "from" case work for either, but I think the "to" case should just use UnsafeMutablePointer, because (a) "void *" is more common than "const void *" in C APIs*, and (b) if you <i>do</i> need to convert, "UnsafePointer(...)" is shorter. :-)</div><div><br></div><div>* citation needed</div><div><br></div><div>(Swift does support overloading on return type, but the downside is you need to always provide context, which makes it harder to break things up into multiple statements. So we generally avoid it unless there's a compelling reason.)</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Jordan</div></font></span></div></blockquote></div><br></div></div>