You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think we could change Subscriber to be a class that extends Subscription and implements Observer rather than the other way around. Then Observer could just be an interface, and we can clean up some logic most likely.
The reason I suggest this is we never actually new up an Observer anywhere... whereas Subscription does get new-ed up and reused frequently. So it doesn't make as much sense to have Subscription be the one that is being used like an interface on Subscriber.
I think we could change
Subscriber
to be a class thatextends Subscription
andimplements Observer
rather than the other way around. ThenObserver
could just be an interface, and we can clean up some logic most likely.The reason I suggest this is we never actually
new
up an Observer anywhere... whereasSubscription
does getnew
-ed up and reused frequently. So it doesn't make as much sense to haveSubscription
be the one that is being used like an interface onSubscriber
.cc/ @trxcllnt
The text was updated successfully, but these errors were encountered: