tc39 / proposal-array-from-async

Draft specification for a proposed Array.fromAsync method in JavaScript.
http://tc39.es/proposal-array-from-async/
BSD 3-Clause "New" or "Revised" License
179 stars 13 forks source link

Bikeshed: fromAsync vs. asyncFrom #2

Closed domenic closed 3 years ago

domenic commented 3 years ago

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 commented 3 years ago

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

ljharb commented 3 years ago

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".