<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 May 3, 2016, at 8:56 PM, Chris Lattner &lt;<a href="mailto:clattner@apple.com" class="">clattner@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hello Swift community,<br class=""><br class="">The review of "SE-0076: Add overrides taking an UnsafePointer source to non-destructive copying methods on UnsafeMutablePointer" begins now and runs through May 9. The proposal is available here:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/apple/swift-evolution/blob/master/proposals/0076-copying-to-unsafe-mutable-pointer-with-unsafe-pointer-source.md" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0076-copying-to-unsafe-mutable-pointer-with-unsafe-pointer-source.md</a><br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>* What is your evaluation of the proposal?<br class=""></div></div></blockquote><div><br class=""></div><div>The new methods are needed, but they don’t need to be overloads. I have no idea why the argument type was originally declared Mutable.</div><div><br class=""></div><div><pre style="box-sizing: border-box; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 14px; margin-top: 0px; margin-bottom: 0px; line-height: 1.45; padding: 16px; overflow: auto; background-color: rgb(247, 247, 247); border-top-left-radius: 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px; word-wrap: normal; word-break: normal; color: rgb(51, 51, 51);" class=""><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">func</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">assignBackwardFrom</span>(source: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">UnsafePointer</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&lt;</span>Pointee<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&gt;</span>, count: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Int</span>)
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">func</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">assignFrom</span>(source: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">UnsafePointer</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&lt;</span>Pointee<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&gt;</span>, count: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Int</span>)
<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">func</span> <span class="pl-en" style="box-sizing: border-box; color: rgb(121, 93, 163);">initializeFrom</span>(source: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">UnsafePointer</span><span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&lt;</span>Pointee<span class="pl-k" style="box-sizing: border-box; color: rgb(167, 29, 93);">&gt;</span>, count: <span class="pl-c1" style="box-sizing: border-box; color: rgb(0, 134, 179);">Int</span>)</pre><div class=""><br class=""></div><div class="">FWIW: I made precisely this change a while back on an experimental branch while experimenting with UnsafePointer conversion. I don’t see a problem with it.</div><div class=""><br class=""></div><div class="">Implicit argument conversion from UnsafeMutablePointer&lt;Pointee&gt; to UnsafePointer&lt;Pointee&gt; is normal and extremely obvious.</div><div class=""><br class=""></div><div class="">-Andy</div></div></div></body></html>