<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi.<div class=""><br class=""></div><div class="">I was looking to implement&nbsp;<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0174-filter-range-replaceable.md" class="">SE-0174</a>&nbsp;(Change&nbsp;filter&nbsp;to return an associated type) but noticed that a different <font face="Menlo" style="font-size: 11px;" class="">RangeReplaceableCollection.filter</font> implementation had already been added in <font face="Menlo" style="font-size: 11px;" class="">fd2ac31</font> to make <font face="Menlo" style="font-size: 11px;" class="">String.filter</font> return a <font face="Menlo" style="font-size: 11px;" class="">String</font>.</div><div class=""><div class=""><br class=""></div></div><div class="">The&nbsp;<font face="Menlo" style="font-size: 11px;" class="">RangeReplaceableCollection.filter</font>&nbsp;implementation in SE-0174 eagerly enumerates <font face="Menlo" style="font-size: 11px;" class="">self</font> to filter its elements:</div><div class=""><br class=""></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div style="font-size: 11px;" class=""><font face="Menlo" class="">var&nbsp;result&nbsp;=&nbsp;Self() &nbsp; &nbsp;</font></div><div style="font-size: 11px;" class=""><font face="Menlo" class="">for&nbsp;element&nbsp;in&nbsp;self { &nbsp; &nbsp; &nbsp; &nbsp;</font></div><div style="font-size: 11px;" class=""><font face="Menlo" class="">&nbsp; &nbsp; if&nbsp;try&nbsp;isIncluded(element) {</font></div><div style="font-size: 11px;" class=""><div class=""><font face="Menlo" class="">&nbsp; &nbsp; &nbsp; &nbsp; result.append(element)</font></div></div><div style="font-size: 11px;" class=""><div class=""><font face="Menlo" class="">&nbsp; &nbsp; }</font></div></div><div style="font-size: 11px;" class=""><div class=""><font face="Menlo" class="">} &nbsp;&nbsp;</font></div></div><div style="font-size: 11px;" class=""><font face="Menlo" class="">return&nbsp;result</font></div></blockquote><div class=""><br class=""></div><div class="">whereas the current implementation creates <font face="Menlo" style="font-size: 11px;" class="">Self</font> from a lazy filter:</div><div class="">&nbsp;</div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div style="font-size: 11px;" class=""><font face="Menlo" class="">return try Self(self.lazy.filter(isIncluded))</font></div></blockquote><div class=""><br class=""></div><div class="">Which of these implementations is preferred for SE-0174?</div><div class=""><br class=""></div><div class="">The intended behavior of SE-0174 is already there with <font face="Menlo" style="font-size: 11px;" class="">Data</font>, <font face="Menlo" style="font-size: 11px;" class="">Set</font>, <font face="Menlo" style="font-size: 11px;" class="">String</font>, etc. returning <font face="Menlo" style="font-size: 11px;" class="">Self</font> when filtered. As far as I can tell the only remaining work is to add the associated type and specify the type alias in a few places to disambiguate which implementation is used to satisfy the Sequence protocol, essentially making this a non functional change. Or am I missing something?&nbsp;</div><div class=""><br class=""></div><div class="">Regards,</div><div class="">David</div></body></html>