Open
Description
Hello,I have been studying the implementation of AnyPublisher in the Combine framework and noticed that the implementation uses an abstract base class PublisherBoxBase and a concrete subclass PublisherBox. I am curious about the design decision behind this approach.
My question is:
1. What is the advantage of having PublisherBoxBase as an abstract base class instead of directly implementing everything in PublisherBox?
2. Is there a specific design pattern or principle that this approach is adhering to?
I appreciate any insights or explanations you can provide. Thank you!
related code:
Metadata
Metadata
Assignees
Labels
No labels
Activity