<div dir="ltr">we agreed to deprecate the strided <span style="font-family:monospace,monospace">at:</span>? Note that UnsafeMutableRawBufferPointer would still need a <span style="font-family:monospace,monospace">byteOffset:</span> argument. I’m also still not comfortable with duplicating functionality for the sake of having two names<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 5, 2017 at 11:31 AM, 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">I think we’ve agreed to a few minor updates to this proposal. Since there hasn’t been any other feedback on the thread it may be worth posting an amended proposal so we all know what we’ve agreed on.<div><br></div><div>-Andy<br><div><br><div><blockquote type="cite"><div><div class="h5"><div>On Sep 3, 2017, at 8:23 PM, Andrew Trick via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:</div><br class="m_5074952175224083149Apple-interchange-newline"></div></div><div><div><div class="h5"><div style="word-wrap:break-word"><br><div><blockquote type="cite"><div>On Sep 3, 2017, at 8:05 PM, Xiaodi Wu &lt;<a href="mailto:xiaodi.wu@gmail.com" target="_blank">xiaodi.wu@gmail.com</a>&gt; wrote:</div><br class="m_5074952175224083149Apple-interchange-newline"><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 class="gmail_extra"><div class="gmail_quote"><div>If we use byte offset, then the<span class="m_5074952175224083149Apple-converted-space"> </span><span style="font-family:monospace,monospace">at</span><span class="m_5074952175224083149Apple-converted-space"> </span>parameter in<span class="m_5074952175224083149Apple-converted-space"> </span><span style="font-family:monospace,monospace">UnsafeMutableRawPointer</span><span class="m_5074952175224083149Apple-converted-space"> </span>sho<wbr>uld be removed, since pointer arithmetic can be used instead (just like with<span class="m_5074952175224083149Apple-converted-space"> </span><span style="font-family:monospace,monospace">UnsafeMutablePointer</span>).</div></div></div></div></blockquote><div dir="auto" 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 dir="auto" 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">I agree that it seems quite sensible to remove the ‘at’ parameter altogether from the UMRP method.</div></div></blockquote><div><br></div>No code in tree or on github is using the `at` argument. I think it can be removed. A fixit should still be possible.</div><div><br><blockquote type="cite"><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 class="gmail_extra"><div class="gmail_quote"><div>Not convinced moving the<span class="m_5074952175224083149Apple-converted-space"> </span><span style="font-family:monospace,monospace">at:</span><span class="m_5074952175224083149Apple-converted-space"> </span>argument to come before the<span class="m_5074952175224083149Apple-converted-space"> </span><span style="font-family:monospace,monospace">as:</span><span class="m_5074952175224083149Apple-converted-space"> </span>argument is worth it in terms of source breakage.</div></div></div></div></blockquote><div dir="auto" 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 dir="auto" 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">Since much of this proposal involves shuffling and relabeling arguments, I’d argue it’s better to break slight more source in one go for the optimal API than to break slightly less for a slightly less optimal API, no? (This is assuming there is agreement that ‘at:as:’ is less prone to misinterpretation than ‘as:at:’.)</div></div></blockquote></div><div><br></div><div>To be clear, we’re just talking about <wbr>UnsafeMutableRawBufferPointer.<wbr>initializeMemory now, so this is purely additive.</div><div>I think the label needs to be `atByteOffset`, and placing it before `as` makes a lot of sense because it no longer depends on the type’s stride. </div><div><br></div><div>-Andy</div></div></div></div><span class="">______________________________<wbr>_________________<br>swift-evolution mailing list<br><a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a><br><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" target="_blank">https://lists.swift.org/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br></span></div></blockquote></div><br></div></div></div></blockquote></div><br></div>