-
Notifications
You must be signed in to change notification settings - Fork 16
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
Priority list of operators #106
Comments
One potential source of data is a poll @benlesh produced back in September 2023:
(Aside: this list is 19, not 20). Currently this proposal wishes to maintain symmetry with the iterator helpers proposal, while also adding a couple of additional operators (
I'm sure @benlesh or @domfarolino could help fill this table in where I've maybe got some things wrong here. However, some observations:
|
Just for posterity, it seems like much of this discussion is happening over on #126 which seems to be pointed at a more hardened list of initial operators to launch with. So maybe this issue can specifically be reserved for follow-on operators that we can consider in the fullness of time / later? |
I do think it's might be helpful to add a third value to the "in iterator helpers" column which indicates the ability is fundamentally irrelevant to iterators and thus naturally wouldn't be part of that proposal. (This would cover all the Separately, I agree with Ben Lesh's comment (somewhere in this repo...) that the natural/safe analogue of sync |
Note that observables are attempting to align not just with sync iterator helpers, but also async iterator helpers. If there are things about async that mean the combinators should be different from sync, then that's good feedback for the async iterator helpers proposal too. |
Ah, right, it's been a bit since I saw the async-iterator-helpers proposal. Looks like this exact topic is called out as the reason it was split from sync iterator helpers, so it could be resolved without slowing down sync stuff. (tc39/proposal-async-iterator-helpers#2, plus a few other issues addressing parts of this) |
The main relevant difference between observables and iterators is that it is much more natural to only care about the latest result when working with observables. A lot of the operators in the above table reflect that: at least I think it's reasonable for observables and iterators to support slightly different sets of operators insofar as it is driven by that distinction.
The flatMap in async iterator helpers will indeed be analogous to
Eh... the way I would put it is that we wanted to design async iterators so they could support consumer-driven concurrency, rather than that we specifically wanted to investigate having additional methods. I think it's likely we'll end up with at least one additional method ( |
This CL implements the following Observable operators: - some() - every() - find() Their inclusion is to be consistent with Iterator helpers [1] and Async iterator helpers [2], and is discussed in WICG/observable#126 and to a lesser extent WICG/observable#106. See WICG/observable#137 for the specification. [1]: https://github.com/tc39/proposal-iterator-helpers [2]: https://github.com/tc39/proposal-async-iterator-helpers For WPTs: Co-authored-by: [email protected] Bug: 40282760 Change-Id: I0fcbb9d716d6ef1727b050fd82a6fa20f53dea4b
This CL implements the following Observable operators: - some() - every() - find() Their inclusion is to be consistent with Iterator helpers [1] and Async iterator helpers [2], and is discussed in WICG/observable#126 and to a lesser extent WICG/observable#106. See WICG/observable#137 for the specification. [1]: https://github.com/tc39/proposal-iterator-helpers [2]: https://github.com/tc39/proposal-async-iterator-helpers For WPTs: Co-authored-by: [email protected] Bug: 40282760 Change-Id: I0fcbb9d716d6ef1727b050fd82a6fa20f53dea4b
This CL implements the following Observable operators: - some() - every() - find() Their inclusion is to be consistent with Iterator helpers [1] and Async iterator helpers [2], and is discussed in WICG/observable#126 and to a lesser extent WICG/observable#106. See WICG/observable#137 for the specification. [1]: https://github.com/tc39/proposal-iterator-helpers [2]: https://github.com/tc39/proposal-async-iterator-helpers For WPTs: Co-authored-by: [email protected] Bug: 40282760 Change-Id: I0fcbb9d716d6ef1727b050fd82a6fa20f53dea4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5426595 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#1293776}
This CL implements the following Observable operators: - some() - every() - find() Their inclusion is to be consistent with Iterator helpers [1] and Async iterator helpers [2], and is discussed in WICG/observable#126 and to a lesser extent WICG/observable#106. See WICG/observable#137 for the specification. [1]: https://github.com/tc39/proposal-iterator-helpers [2]: https://github.com/tc39/proposal-async-iterator-helpers For WPTs: Co-authored-by: [email protected] Bug: 40282760 Change-Id: I0fcbb9d716d6ef1727b050fd82a6fa20f53dea4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5426595 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#1293776}
…d()` Observable operators, a=testonly Automatic update from web-platform-tests DOM: Implement `some()`, `every()`, `find()` Observable operators This CL implements the following Observable operators: - some() - every() - find() Their inclusion is to be consistent with Iterator helpers [1] and Async iterator helpers [2], and is discussed in WICG/observable#126 and to a lesser extent WICG/observable#106. See WICG/observable#137 for the specification. [1]: https://github.com/tc39/proposal-iterator-helpers [2]: https://github.com/tc39/proposal-async-iterator-helpers For WPTs: Co-authored-by: [email protected] Bug: 40282760 Change-Id: I0fcbb9d716d6ef1727b050fd82a6fa20f53dea4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5426595 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#1293776} -- wpt-commits: 8c6b479fae23badbb86e9c993f5b5fbb66e16905 wpt-pr: 45875
…d()` Observable operators, a=testonly Automatic update from web-platform-tests DOM: Implement `some()`, `every()`, `find()` Observable operators This CL implements the following Observable operators: - some() - every() - find() Their inclusion is to be consistent with Iterator helpers [1] and Async iterator helpers [2], and is discussed in WICG/observable#126 and to a lesser extent WICG/observable#106. See WICG/observable#137 for the specification. [1]: https://github.com/tc39/proposal-iterator-helpers [2]: https://github.com/tc39/proposal-async-iterator-helpers For WPTs: Co-authored-by: [email protected] Bug: 40282760 Change-Id: I0fcbb9d716d6ef1727b050fd82a6fa20f53dea4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5426595 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#1293776} -- wpt-commits: 8c6b479fae23badbb86e9c993f5b5fbb66e16905 wpt-pr: 45875
…d()` Observable operators, a=testonly Automatic update from web-platform-tests DOM: Implement `some()`, `every()`, `find()` Observable operators This CL implements the following Observable operators: - some() - every() - find() Their inclusion is to be consistent with Iterator helpers [1] and Async iterator helpers [2], and is discussed in WICG/observable#126 and to a lesser extent WICG/observable#106. See WICG/observable#137 for the specification. [1]: https://github.com/tc39/proposal-iterator-helpers [2]: https://github.com/tc39/proposal-async-iterator-helpers For WPTs: Co-authored-by: [email protected] Bug: 40282760 Change-Id: I0fcbb9d716d6ef1727b050fd82a6fa20f53dea4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5426595 Reviewed-by: Mason Freed <[email protected]> Commit-Queue: Dominic Farolino <[email protected]> Cr-Commit-Position: refs/heads/main@{#1293776} -- wpt-commits: 8c6b479fae23badbb86e9c993f5b5fbb66e16905 wpt-pr: 45875
I'm surprised to not see my favorite operator, |
I'm curious (and can't seem to find evidence) of the decision behind providing the initial operators. On one hand iterator helpers offer a great list to match; symmetry is great! On the other, perhaps some of these APIs are less useful for Observables, and perhaps some result in awkward APIs which have issues (#69).
Given Observable is modeled from user-land libraries such as rxjs, I presume we have some fairly high quality empirical data on what kind of operators users feature in their code. Are we able to qualify that the iterator helpers list overlaps with this data? Are there any outliers that are excluded, or any in the list which are underused?
The text was updated successfully, but these errors were encountered: