In this chapter, we learned about the philosophy behind side effects. We found out that in the process of solving a business-domain problem, programmers end up in a reality different from the one of their business logic. The way you write the program and the phenomena that happen at runtime constitute a reality of their own. If you ignore it, the latter reality can grow in complexity, and this results in a mental overhead.
Functional programming allows you to address the problem of the second-order reality by providing techniques to reify its phenomena into effect types and define their behavior in the language of data structures and pure functions.
Effect types lessen your mental load because they eliminate the necessity to remember all the phenomena that happen in your program, even outside the scope of the code you may currently be looking at.
Effect types also make...