Abstract types and methods in Swift
What abstract types are, how they could be implemented in Swift, and how they relate to protocols and other polymorphic programming techniques.
Articles, podcasts and news about Swift development, by John Sundell.
What abstract types are, how they could be implemented in Swift, and how they relate to protocols and other polymorphic programming techniques.
Let’s take a look at how Swift models the concept of equality, and how that concept varies between value and reference types.
Let’s take a look at how combining value and reference types can unlock some really powerful capabilities, enabling us to utilize both the convenience of reference types, and the safety and limited mutability of value types.
Swift types can, in general, be divided into two categories — value types and reference types — which determines how they will be passed between different functions and other code scopes. Let’s take a look at what some of the practical implications of that are.