April 2026
Intermediate
683 pages
25h 29m
English
As you learned in previous chapters, enumerations, structs, and classes can have properties, and different flavors of properties are available, like the following:
Immutable properties (let)
Mutable properties (var)
Computed properties (get/set)
Static properties (type-based)
Because protocols standardize such data types, it’s only natural for protocols to impose property requirements too. Implementing data types will have to provide such properties of the same name and type.
In the following sections, you’ll discover different types of property requirements and how they are implemented.
A get requirement is a property requirement in which the protocol imposes an immutable/read-only ...
Read now
Unlock full access