Swift: Structs vs Classes
What are the differences? Which one should I prefer?
In Swift, structures and classes are important building blocks. But how do you decide which one to use? What is the difference?
In short:
- Structures are value types.
- Classes are reference types.