Parameterization, also known as generics or polymorphism, is the third most significant language feature following control flow and data structures. Parameterization addresses the copy-and-paste problem of early languages. This feature permits the don't repeat yourself principle of good program design.
In this chapter, we will look at how parameterization can help us design robust programs that evolve with change rather than fight against change. No new project requirements will be introduced. This chapter will be entirely reflective, looking at how the project is currently structured, how can it be improved, and how parameterization can specifically help.
The following are the learning outcomes of this chapter:
- Understanding generalized algebraic datatypes
- Understanding parametric polymorphism
- Understanding parametric lifetimes
- Understanding parametric...