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

Unclear relation to *Observable* proposal #2

Open
bergus opened this issue Nov 23, 2020 · 4 comments
Open

Unclear relation to *Observable* proposal #2

bergus opened this issue Nov 23, 2020 · 4 comments

Comments

@bergus
Copy link

bergus commented Nov 23, 2020

Quickly skimming the readme, your streams proposal seems to target the same use cases as observables - surely you're aware since you were active there as well. Can you please clarify how you expect the two to interact? Is the streams proposal supposed to supersede the observables proposal?

@dead-claudia
Copy link
Owner

Is the streams proposal supposed to supersede the observables proposal?

Yes. The idea is to replace observables entirely with a simpler, more flexible abstraction that offers much better built-in support for dual-channel communication, up to and including being aware of downstream errors and completion. (This enables infinite streams to fulfill a similar purpose to infinite iterators, and it allows Node's behavior of closing source file streams on target error and completion.) It also lacks any inherent "unsubscribe" operation, instead falling back on an eventual cancellation proposal to handle that. So while fundamentally, they're similar, they aren't quite the same and this one is strictly more flexible.

@bergus
Copy link
Author

bergus commented Dec 2, 2020

Thanks, that's good to know. I can see how your proposal is much more flexible (and indeed a better abstraction regarding purity), yet it seems to fail on the simplicity aspect. Or I'm just not familiar with the complexity of observables 😄.
What do you think of your chances to find a champion for this proposal?

@dead-claudia
Copy link
Owner

Or I'm just not familiar with the complexity of observables 😄.

Try implementing an observable library some time. 😉 (It sounds really easy, but it gets hairy quick - there's a lot of hidden complexity.)

What do you think of your chances to find a champion for this proposal?

Haven't gotten around to actively pushing for it, mainly due to lack of time.

@bergus
Copy link
Author

bergus commented Dec 3, 2020

Oh, I did, years ago, to play with functional reactive programming. I also implemented various promise libraries, including an algebraic one with support for cancellation (unsubscribing then callbacks) and while I had planned to write another stream library based on pure transducers, I never got from the idea stage to a design that solved all the problems I had thought about. I'll certainly bug you about your solutions in the next days :-) Not including cancellation/unsubscribe would be dealbreaker for me, but I'll open another issue regarding that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants