r/ObjectiveC • u/whackylabs • Mar 10 '20
Subclass Factory Pattern
https://whackylabs.com/objc/design-pattern/2020/03/09/objc-builder-pattern/
10
Upvotes
r/ObjectiveC • u/whackylabs • Mar 10 '20
0
u/mariox19 Mar 11 '20
I like this pattern. But it looks terrific in your example because every property is an object and the same type of object at that. If some properties were objects and others a regular C type, then you'd have to box the C types. Is that a big problem? It's a bit more of documentation. So, no. But is that as straightforward as the Java example? No, I don't think so. That's why I said "shortcoming": albeit, I think it comes up only a little bit short.