<div dir="ltr">No, I just forgot about the compiler subtyping relationship. Never mind that part then lol<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 18, 2017 at 4:40 PM, Andrew Trick <span dir="ltr">&lt;<a href="mailto:atrick@apple.com" target="_blank">atrick@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"><br><div><blockquote type="cite"><span class=""><div>On Jul 18, 2017, at 11:36 AM, Taylor Swift &lt;<a href="mailto:kelvin13ma@gmail.com" target="_blank">kelvin13ma@gmail.com</a>&gt; wrote:</div><br class="m_-8012624455174603415Apple-interchange-newline"></span><span class=""><div><blockquote class="gmail_quote" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div><div>I&#39;m not sure removing the need for implicit casts is a goal. I did</div><div>that with the pointer `init` methods, but now I think that should be</div><div>cleaned up to reduce API surface. I think smaller API surface wins in</div><div>these cases. Is there a usability issue you&#39;re solving?</div></div></blockquote><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br></div><div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant-caps:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">Yes, I can imagine initializing a mutable pointer to some values, and then wanting to use that pointer as a source to initialize more buffers. Having to convert a mutable pointer to an immutable pointer is annoying because a function that takes an immutable pointer obviously shouldn’t care if the pointer could be mutated anyway. It’s like having to rebind a `<span style="font-family:monospace,monospace">var</span>` variable to a `<span style="font-family:monospace,monospace">let</span>` constant before passing it as any non-<span style="font-family:monospace,monospace">inout</span><span class="m_-8012624455174603415Apple-converted-space"> </span>argument to a function, since function parameters are immutable. At any rate, this only applies to two out of the seven memorystate operations, so comparably, it’s not a big API expansion at all.</div></div></span></blockquote><br></div><div>The conversion you’re talking about should be handled by the compiler.</div><div><br></div><div><div>public func get&lt;T&gt;(_ p: UnsafePointer&lt;T&gt;) -&gt; T {</div><div>  return p.pointee</div><div>}</div><div><br></div><div>public func foo&lt;T&gt;(p: UnsafeMutablePointer&lt;T&gt;) {</div><div>  _ = get(p)</div><div>}</div><div><br></div><div>Or are you thinking of a different use case?</div><div><br></div><div>-Andy</div></div></div></blockquote></div><br></div>