Re: [whatwg/dom] Consider adding AbortController.prototype.follow(signal) (#920)

This feels like it's the prototypical example of where an [explainer](https://w3ctag.github.io/explainers) would make sense. (Also, this is probably the sort of thing where if we were to ship it in Chrome, we'd require an explainer; it's not as much of a no-brainer small addition as #911, and so a background document is necessary.)

Logistically, if it helps, you can consider an explainer similar to the README of a TC39 proposal. Also, it doesn't matter where the explainer is posted; you could put it in your cancellation-use-cases repo as a separate document.

To be clear, I think a lot of people on this thread are on board with the general idea. But the problem and solution space is complicated enough that it would benefit from someone taking the time to collate information like:

- Example use cases, including simple code samples so that people get the idea, plus a sketch of more complicated real-world situations

- Comparison with other ecosystems

- Discussing how people solve this today, and what the drawbacks are.

- Comparison between different APIs, e.g. `new AbortController(...signals)` vs. `new AbortSignal(...signals)` vs. `AbortSignal.race([...signals])` vs. `abortSignal.follow(otherSignal)`. Eventually the explainer should pick one as favored and make the case for it, relegating the others to an "Alternatives considered" section. But maybe you want to start in an exploratory state that puts them all on equal footing and compares them.

- Mentioning other alternative ways to solve this problem, e.g. my ideas (3) in https://github.com/whatwg/dom/issues/920#issuecomment-726961899 .

A lot of this information is scattered throughout the conversation in these issue threads, but collating it into one place will be helpful for outsiders (including, e.g., persuading various implementation teams who might not be following this thread).

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/920#issuecomment-738948994

Received on Friday, 4 December 2020 18:37:36 UTC