<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 Oct 13, 2017, at 7:40 PM, Andrew Trick via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div class=""><br class=""><blockquote type="cite" class=""><div class="">On Oct 12, 2017, at 3:52 AM, Geordie Jay via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><div class="gmail_quote"><div dir="auto" class="">Guillaume Lessard via swift-users <<a href="mailto:swift-users@swift.org" class="">swift-users@swift.org</a>> schrieb am Mi. 11. Okt. 2017 um 23:49:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">A lot of the MutableCollection implementation is in protocol extensions (swapAt, for example.)<br class="">
<br class="">
Should an additional version be written just for the Unsafe*BufferPointer types?</blockquote><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Makes sense to me, given the examples above. It doesn’t seem to be a high priority task though, and one one suited to a contributor pull request rather than taking resources away from the core team.</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Would this kind of change need to go through swift evolution or is it a “no brainer”?</div><div dir="auto" class=""><br class=""></div><div dir="auto" class="">Geordie</div></div></div></div></blockquote><br class=""></div><div class="">I’ll just point out that it’s already the case that methods defined in Unsafe*BufferPointer that write to memory are “nonmutating”. So I think it’s both a “no brainer” and needs to go through evolution.</div></div></div></blockquote><br class=""></div><div>I’m not familiar with the specifics of this “proposal” but if it really is just moving something obvious from being a mutating member to a nonmutating member, then I’m sure the core team can find a fast-path way to accept it without a formal review period.</div><div><br class=""></div><div>-Chris</div><div><br class=""></div><br class=""></body></html>