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

Bikeshed: fromAsync vs. asyncFrom #2

Closed
domenic opened this issue Aug 23, 2021 · 2 comments
Closed

Bikeshed: fromAsync vs. asyncFrom #2

domenic opened this issue Aug 23, 2021 · 2 comments

Comments

@domenic
Copy link
Member

domenic commented Aug 23, 2021

We have a weak precedent that when there are methods with both sync and async versions, async is a suffix, not a prefix.

Atomics.waitAsync() is the ES precedent. Web GPU has a number of others.

@js-choi
Copy link
Collaborator

js-choi commented Aug 23, 2021

This is a good point. I will change the proposal’s method name to Array.fromAsync sometime before the August meeting.

@ljharb
Copy link
Member

ljharb commented Aug 23, 2021

I was happy with asyncFrom, but I can easily convince myself that Array.fromAsync makes more sense because it's "an array from an async iterator" rather than "it's asynchronously an array from something".

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 1, 2022
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

3 participants