If top level await is a bad idea, then is await worth having at all ?
It has been postulated (with sound reasoning) that top level await is a bad idea.
If so, are there any advantages to having await
at all, when we already have yield
.
Having async is useful because an async function is guaranteed to return a promise irrespective of what is actually returned by the code. But do have some similar reasoning behind await
as well ?