<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">&lt;<a href="mailto:jordan_rose@apple.com" target="_blank">jordan_rose@apple.com</a>&gt;</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 &lt;<a href="mailto:jtbandes@gmail.com" target="_blank">jtbandes@gmail.com</a>&gt; wrote:</div><br><div><div dir="ltr">Thanks, Jordan. I&#39;ll write one up tonight.<div><br></div><div>Should it use UnsafePointer or UnsafeMutablePointer?  I&#39;ve seen that C APIs frequently get imported as UnsafeMutablePointer, when it doesn&#39;t necessarily match the semantics of the API. Is that just the default?</div></div></div></blockquote></div><br></span><div>Either way we&#39;re going to lose in some cases. We can probably make the &quot;from&quot; case work for either, but I think the &quot;to&quot; case should just use UnsafeMutablePointer, because (a) &quot;void *&quot; is more common than &quot;const void *&quot; in C APIs*, and (b) if you <i>do</i> need to convert, &quot;UnsafePointer(...)&quot; 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&#39;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>