Destroy All Ifs — A Perspective from Functional Programming

Boolean blindness errors are really just protocol errors. Someone screwed up on the serialization or deserialization side of things; or maybe just caller or callee misunderstood the protocol and thought different bits had different meanings.

In functional programming, the use of lambdas allows us to propagate not merely a serialized version of our intentions, but our actual intentions! In other words, lambdas let us pull the intentions out of the callee site, and into the caller site, since we can propagate them directly without serialization.