map() versus flatMapThrowing()

Republished here: https://hippieinablazer.com/map-versus-flatmapthrowing

This threw me off for a little and I’d like to share my findings.

I’m using Vapor on a little side-project and part of the beauty of that backend framework is that everything is a stream, backed by SwiftNIO. Now I haven’t done any benchmarks, performance-wise, but it’s nice to have a backend that uses streams, and a front-end built in a reactive way with Combine. It means the same paradigm applies to both and I don’t have to go all procedural in one and stream/reactive in the…