<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Nov 15, 2017, at 11:07 PM, Gwendal Roué via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@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; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">Le 16 nov. 2017 à 06:29, Matt Gallagher via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class="">My opinion is that filterMap is the right choice of name.<br class=""><br class="">I'm completely biased, given that I already have a Swift library that uses filterMap, in exactly this context, for a Reactive Programming library:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><a href="https://github.com/mattgallagher/CwlSignal/blob/22f1d47895896d7b55bc59a4ee5394071f3c84cf/Sources/CwlSignal/CwlSignalReactive.swift#L453?ts=3" class="">https://github.com/mattgallagher/CwlSignal/blob/22f1d47895896d7b55bc59a4ee5394071f3c84cf/Sources/CwlSignal/CwlSignalReactive.swift#L453?ts=3</a><br class=""></div></div></blockquote><div class=""><br class=""></div><div class="">Another popular Reactive Programming Library uses filterMap with a different signature, and a different meaning: <a href="https://github.com/RxSwiftCommunity/RxSwiftExt/blob/3.0.0/Source/RxSwift/filterMap.swift#L32" class="">https://github.com/RxSwiftCommunity/RxSwiftExt/blob/3.0.0/Source/RxSwift/filterMap.swift#L32</a></div><div class=""><br class=""></div><div class="">There are already different interpretations on "filter" in "filterMap" in the wild.</div><div class=""><br class=""></div><div class="">Gwendal Roué</div><div class=""><br class=""></div></div></div></div></blockquote></div><br class=""><div class="">This library is using filterMap in exactly the same way proposed, except that they use a custom result type instead of Optional. So yes, it has a different signature, but I don’t think it has a different meaning. It’s still running a map operation that may filter some values out.</div><div class=""><br class=""></div><div class="">-BJ</div></body></html>