2 ms·
The first thing that immediately lept out at me as I was reading this was that turning Futures into Functors is great if your future implementation understands
by KirinDave 15y ago
The first thing that immediately lept out at me as I was reading this was that turning Futures into Functors is great if your future implementation understands that is how they are going to be used. I've seen several naive examples of concurrent Futures that would horribly break if used in this way. Heck, I've seen good future implementations that would execute that code sub-optimally.
To my eye, this article is a microcosm of the fundamental tension of scala. On the one hand, we have a mountain of stable code from the java world; on the other, a strong desire to leverage the more robust techniques of FP. Unfortunately, they have to be mixed with extreme care or you end up creating performance bottlenecks and breaking semantics.