
Ask HN: (JS) Wouldn't it be simpler if `await` were a method on `Promise`? - thinkloop
Instead of requiring special new syntax like we have now:<p>const result = await doAsync();<p>We could have a method on the returned Promise object called &#x27;await&#x27;:<p>const result = doAsync().await();
======
neilk
1) There could be an `await` method already defined on the Promise. It's just
an object.

2) `await` can work with anything that conforms to the Promise spec, native
promises or Bluebird or what have you.

3) Sometimes, a method doesn't return a Promise, but a value. In those cases,
the await syntax returns the value. Can't do that with a method.

