[swift-evolution] [Review] SE-0187: Introduce Sequence.filterMap(_:)
Ben Cohen
ben_cohen at apple.com
Wed Nov 8 16:00:53 CST 2017
> On Nov 7, 2017, at 3:35 PM, Kevin Ballard via swift-evolution <swift-evolution at swift.org> wrote:
>
> It's a fairly minor issue, one that really only affects new Swift programmers anyway rather than all users
>
I’ve seen enough misuse of flatMap at this point to be confident saying it’s not just a beginner error. Experienced programmers (as experienced as any Swift programmer can be for a 4-year-old language) frequently use flatMap when they mean map. It happens in Apple codebases, and in popular frameworks. Even with knowledgeable programmers, the explanation of the mistake they’ve made often takes a couple of minutes to sink in. The overload is actively confusing across the spectrum.
More information about the swift-evolution
mailing list