Summary

In this chapter, we took an in depth look at classes and structures. We saw what made them so similar and also what makes them so different. In the coming chapters, it will be important to remember that classes are reference types while structures are value types. We also looked at protocols and extensions.

At the end of this chapter, we looked at memory management with ARC and how to avoid strong reference cycles. While Swift, for the most part, takes care of memory management for us, it is important to understand how memory management works so we can avoid common mistakes such as the strong reference cycles.

As this chapter ends, we end the introduction to the Swift programming language. At this point, we have enough knowledge of the Swift language to begin writing our own applications; however, there is still much to learn.

In the following chapters, we will look in more depth at some of the concepts that we already discussed, such as optionals and subscripts. We will also show how to perform common tasks with Swift, such as parsing common file formats and handling concurrency. Finally, we will have some chapters that will help us write better code, such as a sample Swift style guide, and a chapter on design patterns.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset