Leave a rating/review
Notes: 36. Conclusion
Update Notes: This course was originally recorded in 2019. It has been reviewed and all content and materials updated as of October 2021.
Excellent job! You’ve reached the end of this part of the course.
You learned a lot of options for properties! You know how to make properties for instances or types. You can make stored properties that are set at initialization and ones that are lazily calculated the first time you access them.
You also know how to write computed properties that figure out their value every time you access them. You can define properties that are read-only, and ones where you can get and set the value. You also tried out property observers that let you react to the changing values of variables.
Finally, you took another look at methods and used them in both Structures and Enumerations. You also made two versions a methods: one meant to mutate the type, and one that didn’t.
In the next part of the course, you’ll learn some techniques specific to Classes. You’ll also learn more about Protocols, and see how they work together with all of the other named types.