November 2019
Intermediate to advanced
336 pages
11h 30m
English
This chapter covers
We’ll start our discussion of generic types by covering a common case in which they should be used: making independent, reusable components. We’ll look at a couple of scenarios in which we would benefit from an identity function (a function that simply returns its argument) and see a generic implementation of such a function. We’ll also review the Optional<T> type we built in chapter 3 as another simple but powerful generic type.
Next, we’ll talk about data structures. Data structures give shape to our data without having to be aware of what ...
Read now
Unlock full access