News for hackers. Stuff that matters.
Re:Clojure Don’ts: Lazy Effects (2015) by hota_mazi on Saturday March 03, 2018 @05:58PM (#16512215)
How does laziness keep you honest about side effects exactly?

If anything, eager evaluation will reveal the bug faster.

Re:Clojure Don’ts: Lazy Effects (2015) by kerkeslager on Saturday March 03, 2018 @09:13PM (#16512884)
Side effects aren't a bug, in most programs, but they are impure (and purity is the main goal of Haskell). So if Simon Peyton Jones or someone else introduces code that causes side effects, in an eagerly-evaluated pure language like ML, it might not be obvious, because programs that use the impure code can behave as expected. But if you introduce side effects to a lazy language like Haskell, the side effects will happen at the wrong time, or not at all, making it immediately obvious that your code has side effects, and SPJ can replace the impure code with pure code that returns a description of the side effects, which are then evaluated by the runtime, as Haskell intended side effects to be handled.