Equality
Let’s take a look at how Swift models the concept of equality, and how that concept varies between value and reference types.
Articles, podcasts and news about Swift development, by John Sundell.
Let’s take a look at how Swift models the concept of equality, and how that concept varies between value and reference types.
What sort of capabilities that a mutating Swift context has, and what the mutating and nonmutating keywords do.
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.
One really interesting aspect of Swift’s overall design is how centered it is around the concept of value types. This week, let’s take a look at a few different ways in which we can make use of the semantics of value types — and how doing so could significantly improve the flexibility of our value-based code.
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.