In #swiftlang if our model are struct but we need inheritance, is it better to migrate to classes or to use composition?
Conversation
A code snippet being better than a thousand words: gist.github.com/AliSoftware/9e so what's the best approach?
1
3
Composition.
1
1
1
1
1
Replying to
Replying to
Thx for your insight. So in my GIST (updated) the best approach is solution 3 right? to still keep encapsulation
1
Show replies


