Earlier quoted context omitted.
Yes, An async function is explicitly async (in its definition). The syntax is obvious which is why JavaScript chose to go that route (rather than adopt channels at a language level for example). Plus, 95% of the time I care about the singular return value of a function - I just want something that's a function but async - and not a green thread that's using a channel to send information back. Both conceptually and in…
Most of the time you write `let x = await foo()` in js should become `x, err := foo() if err != nil then return nil, err end` in go, not anything to do with channels
Or
const results = await Promise.map(xs, x => process(x), { concurrency: 2 })
Or having 2 concurrent loops processing some data?All things that require more boilerplate in Go while trivial in Node.