Problem Statement
Describe value semantics vs reference semantics in Swift and why this distinction matters when choosing `struct` vs `class`.
Explanation
Value semantics mean that when you assign or pass a struct instance you get a copy; changes to the copy don't affect the original. Reference semantics mean that when you assign or pass a class instance you pass a reference to the same object; changes through one reference affect all. /n/n In Swift structs are value types, classes are reference types. Choosing a `struct` means you get safer, simpler copying behaviour and less unintended sharing; choosing a `class` enables identity, inheritance and shared mutable state. Understanding these differences helps you design robust code and avoid bugs like unintended mutation.