<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="">Yes. Sorry, it was composed by Brent - not sure why I thought it was Erica - that is why I couldn't find it. Thanks!<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 28, 2016, at 9:11 AM, David Rönnqvist <<a href="mailto:david.ronnqvist@gmail.com" class="">david.ronnqvist@gmail.com</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=""><div class="">Is this (below) the list you were referring to? (copied from: <a href="https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160613/021301.html" class="">https://lists.swift.org/pipermail/swift-evolution/Week-of-Mon-20160613/021301.html</a> )</div><div class=""><br class=""></div><div class="">- David </div><div class=""><br class=""></div><div class="">——————————————————————————————</div><div class=""><br class=""></div>`map`, `filter`, and `reduce` are *the* higher-order functions. Almost anything with any kind of block/lambda/closure feature supports them (I'm giving the side-eye to Foundation here), and all three names are backed by *very* strong conventions:<br class=""><br class="">* `map` is by far the strongest. It is universally supported among languages with higher-order collection operations, and is almost always called `map`. In Wikipedia's list of 32 languages with a `map` <<a href="https://en.wikipedia.org/wiki/Map_(higher-order_function)#Language_comparison" class="">https://en.wikipedia.org/wiki/Map_(higher-order_function)#Language_comparison</a>>, we find (grouping together similar names like `map` and `maplist`, and double-counting languages with several aliases):<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Map: 19<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Collect: 3<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Apply: 3<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Special syntax: 2<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Select: 1 (C#, which uses it in the SQL-inspired LINQ)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Transform: 1 (C++, which uses a bizarre signature involving an out parameter)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>ForEach: 1 (XPath)<br class=""><br class="">* `filter` is supported nearly as widely as `map`, and the name `filter` is used nearly as consistently as `map`. Wikipedia lists 27 languages supporting a `filter`-style function, and `filter` is by far the most common choice, arguably favored even more consistently than `map` <<a href="https://en.wikipedia.org/wiki/Filter_(higher-order_function)" class="">https://en.wikipedia.org/wiki/Filter_(higher-order_function)</a>>:<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Filter: 17<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Select: 4<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Special syntax: 3<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>FilteredArrayUsingPredicate: 1 (Foundation, doesn't actually take a closure)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Where: 1 (C#, in LINQ)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>CopyIf: 1 (C++, bizarre signature)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>FindAll: 1<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Grep: 1<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>RemoveIfNot: 1<br class=""><br class="">* `reduce` is extremely popular among functional languages because it's a primitive list-handling operation, although it's a little less common among mainstream languages than the other two. It *does* actually have an alternate name, `fold`, which is nearly as common as `reduce`. However, languages using `fold` are usually those which support both leftward- and rightward-reducing versions of the operation, whereas languages using `reduce` usually don't. Swift falls into the second camp. From Wikipedia's 39-language list <<a href="https://en.wikipedia.org/wiki/Fold_(higher-order_function)" class="">https://en.wikipedia.org/wiki/Fold_(higher-order_function)</a>>:<br class=""><br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Reduce: 20<span class="Apple-tab-span" style="white-space: pre;">        </span>(with both left and right: 4)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Fold: 18<span class="Apple-tab-span" style="white-space: pre;">        </span>(with both left and right: 12)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Inject: 3<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Special syntax: 3<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Aggregate: 1 (C#, in LINQ)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Accumulate: 1 (C++, bizarre signature)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>Partition: 1<br class=""><div class=""><span class="Apple-tab-span" style="white-space: pre;">        </span>ToIterator: 1</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="">On 28 Jun 2016, at 07:31, Charlie Monroe 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="">Erica had a nice list of various term-of-art usages among languages - it included filter, map, etc. - I just can't seem to find it anywhere. This nicely showed that there is only a few languages that name things differently, mostly C# and C++.<div class=""><br class=""></div><div class="">"filter" is nowadays quite a universal word that is in many languages - and I'm talking both about programming and a natural language. And I don't think that it goes against what one might be expecting - when you open a filter in the UI, you don't tick things that you don't want to see, but items that you *do* want to see.</div><div class=""><br class=""></div><div class="">I don't think that changing those names will add any additional value to the Swift language. I've personally had more issues with the naming of flatMap - it could have been called filterMap to stay in line of filtering by returning nil (flattening an array is in my head associated with flattening of an array of arrays). But it's a term of art and I got my head around it. </div><div class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Jun 27, 2016, at 9:31 PM, Erica Sadun 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=""><div class="">Under consideration is the resolution that "<i class="">some terms of art while appropriate to </i><i class="">many FP languages, may be better served by using Swift names</i>."</div><div class=""><div class=""><br class=""></div><div class="">Consider, for example, `filter(_:)`. Sean Heber writes,</div><div class=""><br class=""></div><div class=""><blockquote type="cite" class=""><span style="font-family: Palatino-Roman;" class="">Just tossing my vote in the hat for renaming .filter() to something like .select() since that better matches what it does, IMO. “Filter” is almost like the opposite word from what it should be since the closure returning true is what decides what is included in the results, not what is filtered *from* the results. I mean, yeah, I can kind of understand the logic either way, but it’s always been one of those strange mental gymnastics things."</span></blockquote></div><div class=""><font face="Palatino-Roman" class=""><br class=""></font></div><div class=""><font face="Palatino-Roman" class="">When asked "</font>Shouldn't there be a term of art exemption for `filter(_:)`. Otherwise why not use `select(where:)`," <span style="font-family: Palatino-Roman;" class="">Dave Abrahams replies:</span></div><div class=""><span style="font-family: Palatino-Roman;" class=""><br class=""></span></div><div class=""><blockquote type="cite" class=""><span style="font-family: Palatino-Roman;" class="">Because `where(...)` is better.</span></blockquote></div><div class=""><span style="font-family: Palatino-Roman;" class=""><br class=""></span></div><div class=""><font face="Palatino-Roman" class="">Have at it.</font></div></div><div class=""><font face="Palatino-Roman" class=""><br class=""></font></div><div class=""><font face="Palatino-Roman" class="">-- E</font></div><div class=""><font face="Palatino-Roman" class=""><br class=""></font></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div>_______________________________________________<br class="">swift-evolution mailing list<br class=""><a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class=""><a href="https://lists.swift.org/mailman/listinfo/swift-evolution" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class=""></div></blockquote></div><br class=""></div></div></blockquote></div><br class=""></div></body></html>