On Thu, Dec 10, 2009 at 12:01 PM, John D. Earle
<JohnDEarle@cox.net> wrote:
This is a matter that I genuinely at the
present time do not grasp and I am hoping that some of you who are more familiar
with the Haskell language may be able to help enlighten me. I feel the question
to be an important one. What material benefit does Haskell derive from being a
"pure" functional language as opposed to an impure one? Please provide examples
as I require instruction.
The killer app for that, IMO, is parallelism these days.In large applications it's very hard to know for sure that a function truly has no side effects, so if the language can actually guarantee it for you then that certainly has immense value if you're trying to run things in parallel.
Of course, various forms of lazy processing is becoming popular even in mainstream languages (especially with LINQ etc.), which also requires that the expressions to be pure. Currently mainstream languages rely on programmers being Very Careful, but again these kinds of assumptions aren't scalable.