3 ms·
Pure code is code with no side effects. The result of a pure function only depends on its input parameters, and not the state of the world. Such code is by-defa
by dons 15y ago
Pure code is code with no side effects. The result of a pure function only depends on its input parameters, and not the state of the world. Such code is by-default thread-safe, composable and tends to be simpler to understand than code with multiple interactions with external state.
It also admits many optimizations in the compiler, garbage collector and runtime system that are not possible for code without such safety guarantees.
It is this IO and thread throughput and scaling results that are being hinted at in this post, I think. And projects like Snap and Yesod are taking advantage. http://www.yesodweb.com/blog/2011/03/preliminary-warp-cross-language-benchmarks http://www.yesodweb.com/blog/2011/03/preliminary-warp-cross-...