The perfect API

Imagine for a second that everything had the same interface. Everything. If this API is going to handle every situation, its surface area can't be used conditionally. E.g. we don't use certain parts for certain problem domains. Every part must be useful for every problem domain. It sounds like…

Fail-fast vs. fail-slow composition

Composing effectful operations can be of many types. If you want fail-fast composition, then you need to go for monadic ones. You can have each of your functions return the monad of your choice (e.g., Either). Then you can use for-comprehensions to compose them. If you want to have…

Monads are about "happy paths"

This keynote does a good job in stressing that monads are all about allowing programmers to write explicit code only for the happy path in the specific context at hand (e.g., in the context of a "throwable" computation)…

Failures in the presence of side-effects

Failures are difficult, yet our applications tend to fail more than we would want them to. More so, failures in the presence of side-effects are specially dangerous, because we need to somehow revert the changes we’ve applied, but before we do that we need to know how much of…