Last year, Apple delivered a great talk on the benefits of using value types and protocol-oriented design patterns in our code. This year with Swift 3, the team at Apple added value types to the Foundation framework. Many of our favorite and heavily used classes now have value type equivalents. We will cover how to use Foundation value types throughout this chapter and have you wondering why value types weren't included with Swift from the beginning!
New to Foundation and made possible by Swift 3, the new measurements and units API https://developer.apple.com/reference/foundation/nsmeasurement addresses pain points that have been with Objective-C and Swift developers for a long time. Apple has created an extremely well thought out solution to our problems. We will use several examples to hammer in the concepts so that you will leave this chapter better prepared to handle your measurement challenges in the future.