News for hackers. Stuff that matters.
Re:Why Co–Star Uses Haskell by samhh on Friday November 05, 2021 @06:58PM (#29125634)
Yes, impurity (or rather the representation thereof) is contagious. This is where the common "functional core, imperative shell" comes into play. You generally try to push side effects to the edge.

There are other approaches you can take too, like encoding your effects in a monad which has a different runtime representation in tests. It's like mocking on steroids with type safety.

There are no comments on this comment yet.