Chapter 9. Reduce your code: Use less, do more with class detergent

Congratulations! You’ve finished all the beginner’s topics, and now you move on to intermediate topics. In this first intermediate-level chapter, you learn about classes and how they make your code cleaner, shorter, and easier to reuse.

This chapter covers

  • What is a class?
  • Why would I use a class, anyway?
  • What are the benefits of classes?
  • What are initializers?
  • How do classes inherit from their parent classes?
  • What is evolution?
  • What’s scope and how does it apply to your code?
  • What’s the difference between declaring, defining?

Milestone 9, Reduce your code, ...

Get Hello Swift! now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.