1. When would you pick a struct over a class in Swift, and vice versa?
Interview promptStrong signal
Discusses value semantics, identity, mutation, and SwiftUI integration.
Follow-up probes
- •What about reference cycles?
- •How does this affect testability?
Red flags
- •Says structs are always better.
- •Cannot explain copy-on-write.