On Sunday, 1 April 2018 at 01:01:24 UTC, Jonathan M Davis wrote:
So, I think that the only large-scale benefit thet exists for
pure and really can exist for pure is the fact that you know
that the function doesn't access global, mutable state.
Everything else it does is just gravy and too limited to be a
"large-scale" benefit. Certainly, optimizations are clearly
_not_ the main benefit of pure, since they almost don't exist.
But over time, we have managed to add more gravy here and there
as we've figured out assumptions that can be made based on pure
(like the case where we can convert the result of a pure
function to immutable).
- Jonathan M Davis
Great write-up.
Why keep pure when the benefits obviously don't outweight the
costs?
Here is what I interpret reading this: "lost productivity".