News for hackers. Stuff that matters.
Re:Using Monads in C++ to Solve Constraints: 1. The List Monad by tome on Thursday May 14, 2015 @02:58PM (#9546885)
What do "pure" and "lazy" mean to you?
Re:Using Monads in C++ to Solve Constraints: 1. The List Monad by mafribe on Friday May 15, 2015 @10:48AM (#9550964)
Lazy is easy: it's call-by-name evaluation, i.e. (lambda x.M)N -> M[N/x] with caching, ie. each argument is evaluated at most once.

Purity is more subtle. I don't think there's an agreed upon definition. [1] essentially ties purity to the equivalency of call-by-name, call-by-need and call-by-value evaluation orders (ignoring divergence and errors). I'm not totally sure that is the right definition.

[1] A. Sabry, What is a Purely Functional Language?

Re:Using Monads in C++ to Solve Constraints: 1. The List Monad by dllthomas on Friday May 15, 2015 @01:53PM (#9552346)
The most proximate question here, with respect to purity, is "can you do O(1) mutation (outside of the narrow case of replacing a thunk with its result)?" The theory is far more interesting when we say "no", but the answer in the case of Haskell is "yes".
Re:Using Monads in C++ to Solve Constraints: 1. The List Monad by tome on Saturday May 16, 2015 @07:52AM (#9555783)
With those definitions pure and lazy languages can certainly do mutation and have effects, viz. the IO and ST monads.