Swift types can be arranged into three basic groups: structures, classes, and enumerations. There are other types that fall outside of these three, such as closures, but these are the building blocks of Swift. All three can have
properties: values associated with a type
initializers: similar to a function, code that initializes an instance of a type
instance methods: functions specific to a type that can be called on an instance of that type
class or static methods: functions specific to a type that can be called on the type itself
Figure 2.1 Swift building blocks
Swift’s structures and ...