The problems with the core function libraries are mostly about structure. In fact, we could address them by adding encapsulation (classes specifically designed for each scalar variable type), a consistent method naming scheme, and consistent parameter ordering.
In this chapter, we’re going to look at how to package a new API. We’ll create classes to decorate scalar types, discuss how we can determine the type of scalar variables we’re dealing with, and even learn how to deal with the problems introduced by null.
Decorating
Decorating is a term given to the practice of wrapping data in a class, so that ...