Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(subscribers): reduce inheritence usage in subscribers #222

Closed
benlesh opened this issue Aug 27, 2015 · 2 comments
Closed

refactor(subscribers): reduce inheritence usage in subscribers #222

benlesh opened this issue Aug 27, 2015 · 2 comments

Comments

@benlesh
Copy link
Member

benlesh commented Aug 27, 2015

We have a few operators that have gotten a little deep with inheritance. In particular switchLatest (aka flatMapLatest), in which

SwitchLatestSubscriber extends FlatMapSubscriber
FlatMapSubscriber extends MergeSubscriber
and MergeSubscriber extends Subscriber

The problems with this are:

  • It gets a little hard to follow after a bit.
  • refactoring becomes more difficult
  • less modularity

If shared functionality/methods are a goal, perhaps it would be better to share them via module imports?

attn @trxcllnt

@benlesh
Copy link
Member Author

benlesh commented Aug 27, 2015

It's my opinion that we should probably keep inheritance to one level deep, with the occasional exception.

@benlesh benlesh mentioned this issue Sep 15, 2015
@benlesh
Copy link
Member Author

benlesh commented Sep 18, 2015

I think this has been met to some degree by #316. Closing for now.

@benlesh benlesh closed this as completed Sep 18, 2015
@lock lock bot locked as resolved and limited conversation to collaborators Jun 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant