August 2018
Intermediate to advanced
380 pages
10h 2m
English
Another useful metaphor for the Type Class pattern is that there are toolboxes that allow you to do things to your data.
Imagine yourself as a carpenter. A carpenter is a person who creates things from wood. How does one go about creating useful things from wood? They take raw wood and go to their workshop, where they have a bunch of tools to work with wood. They use hammers, saws, and so on to turn wood into tables, chairs, and other goods. If the carpenter is sophisticated, they will probably differentiate between different types of wood. For example, certain trees have robust wood, and other trees have soft wood. The same saw is more effective with one type of wood than with another. So, the carpenter has different types of saws ...