Happy to hear that we went in this direction! Looking forward to the compact method as well.
Jarod On Dec 19, 2017, 08:56 -0800, John McCall via swift-evolution <swift-evolution@swift.org>, wrote: > Hi, Swift community! I apologize for the delay in reporting our decision > here; between one holiday and the other, it took awhile for the core team to > assemble a quorum to talk through this. > > Proposal Link: > https://github.com/apple/swift-evolution/blob/master/proposals/0187-introduce-filtermap.md > > The second review of SE-0187 “Introduce Sequence.filterMap(_:)” ran from > November 15...20, 2017. The result of the first review was consensus to > rename the method, and the purpose of the second review was to get more > specific feedback on what the new name should be. > > "filterMap" is a name with some precedent in other programming languages, > especially functional ones, but some people felt strongly that the name was > misleading because, as a combined operation, it wasn't quite a filter or a > map. Of the alternatives, the one with the strongest support seemed to be > "compactMap", which builds on the precedent of "compact", an operation from > other languages (notably Ruby) which returns a copy of the input without nil > values. Swift does not currently have such an operation, and in fact it is > not currently possible to express it; nonetheless, the core team agrees that > it would be a reasonable operation to add, and that "compactMap" is a good > name for the operation. > > Therefore, SE-0187 is accepted, with the revision that the new name be > Sequence.compactMap(_:), and with the agreement that we will add > Sequence.compact() when it is possible to do so. > > Thank you all for your continued contributions to making Swift a better > language. > > John McCall > Review Manager
_______________________________________________ swift-evolution mailing list swift-evolution@swift.org https://lists.swift.org/mailman/listinfo/swift-evolution