<div dir="ltr">What I meant by flagging the renaming of the generic `flatMap` to the more specific-to-this-case `filterMap` is that all of the current uses of `flatMap` share conceptual details: they all process whatever is in the box, then perform one level of flattening.<div><br></div><div>This shared concept is hugely valuable, IMO, for people who are new to Swift in being able to form an understanding of what these functions do, and also for library authors who are creating box types and want discoverable, intuitive API names.</div><div><br></div><div>This is the reason why I lean towards keeping `flatMap` and adding a compiler warning for incorrect/redundant uses.</div><div><br></div><div>Cheers,</div><div><br>Sam</div><div><br><div class="gmail_quote"><div dir="ltr">On Fri, 10 Nov 2017 at 05:43 BJ Homer &lt;<a href="mailto:bjhomer@gmail.com" target="_blank">bjhomer@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space"><div><blockquote type="cite"><div><br>On Nov 9, 2017, at 11:35 AM, Tino Heth &lt;<a href="mailto:2th@gmx.de" target="_blank">2th@gmx.de</a>&gt; wrote:</div><br class="m_3171886642295143000m_2054306875637260820Apple-interchange-newline"><div><div style="word-wrap:break-word;line-break:after-white-space"><div><br><blockquote type="cite"><div><span 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;float:none;display:inline!important">This proposal only proposes renaming the “filterNonesAndMap” variant (though that name is misleading, it would be “filterNonesAfterMapping” if anything); the other uses of flatMap will remain unchanged.</span><br 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"></div></blockquote></div>… then it should be really right: As I learned in the thread, there is a map step before filter, and another map afterwards - so „filterNonesAfterMappingAndMap“ (that’s why I don’t like the use of the term „filter“ here — if you want an accurate name that contains this verb, it gets quite complicated…)</div></div></blockquote></div> </div><div style="word-wrap:break-word;line-break:after-white-space"><div>But obviously “filterNonesAfterMappingAndMap” is not a name we’re going to end up with. You can argue that “filterMap” is not completely faithful to the internal implementation, but I think it’s clearly better than “flatMap” in this case, which is even <i>more</i> incorrect. I’m not opposed to finding a better name than “filterMap”, but so far I haven’t seen one.</div></div><div style="word-wrap:break-word;line-break:after-white-space"><div><br></div><div>-BJ</div></div></blockquote></div></div></div>