Previously, we discussed collections as an example of imperative and declarative data structures. However, the functional and declarative styles also contain some data structures specific to them.
Collections abstract away multiplicity. Functional languages such as Scala, Haskell, and others bring in some other data structures that abstract away side effects. We can refer to them as effect types.
We have argued that pure algebraic and declarative approaches remove time from the equation. This is advantageous because time taxes the programmer's mind. Functional programming takes this idea further by removing side effects from your programs. They also burden the mind as you also need to take them into account and handle them properly.
Previously, we discussed an example of how a Java list interface throws exceptions. We argued that it is pretty bad because it increases...