Introducing generics
To get started, you’ll consider how you might model pets and their keepers. You could do this using different values for each or you could do this by using different types for each. You’ll see that by using types, instead of values, the Swift type checker can reason about your code at compile time. Not only do you need to do less at runtime resulting in faster code, but you can catch problems that were not possible using just values.