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

Add more advice on when not to use Promises #65

Open
plinss opened this issue Mar 4, 2020 · 3 comments
Open

Add more advice on when not to use Promises #65

plinss opened this issue Mar 4, 2020 · 3 comments
Assignees

Comments

@plinss
Copy link
Member

plinss commented Mar 4, 2020

w3ctag/design-principles#138 was caused by a use of Promises that were never expected to resolve. That API has since been redesigned. We should advise against using promises that only reject.

@plinss plinss added this to the 2020-08-03-week milestone May 4, 2020
@atanassov
Copy link

@plinss and I discussed during our May 2020 virtual f2f. Reading through the original issue and current state of the promises spec we propose adding a new sub-section and recommend that promises are not be used if there is no clear path for completion under normal circumstances.

@annevk
Copy link
Member

annevk commented May 27, 2020

What's an example of something that almost always throws?

@plinss
Copy link
Member Author

plinss commented May 27, 2020

There was a (since changed) API design, IIRC for wake lock, where a promise was used that never resolved but only rejected. We're advising not to do 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

3 participants