How would you propose that async/await work without Promises? Even C#'s async/await uses the same concept: https://msdn.microsoft.com/en-us/library/system.threading.ta...
Pending the implementation of new language syntax, raw Promises were a practical solution for what they set out to accomplish. If you don't think they improved callback hell at all, I expect that you probably weren't using them correctly (an easy mistake to make without looking at the documentation and/or reading the wrong tutorials / blog posts).
cf.
getAsyncValue1(a =>
getAsyncValue2(a, b =>
getAsyncValue3(b, c =>
doSomething(c)
)
)
);
and getAsyncValue1().then(a =>
getAsyncValue2(a)
).then(b =>
getAsyncValue3(b)
).then(c =>
doSomething(c)
);
Sure, async/await flattens that to zero nested callbacks, which is great, but with that off the table I'd rather deal with code flattened to one level deep (or a few, in some edge cases) than arbitrarily many. And that's just the "callback hell" improvement; don't forget what a nightmare error handling with callbacks can be — you have to handle both synchronous exceptions and error value callback parameters, you have to deal with the possibility of the asynchronous function unexpectedly calling your callback more than once, etc.You do realise that async/await is basically syntactic sugar for promises in JS, don't you?
You do realize that implementing promises is a prerequisite for async/await, right?
Is it really a requirement? I would think callbacks and a preprocessor are sufficient.
Another fine example of JavaScript trying to be hip and ignoring the lessons learned from countless other languages over the years.
I see this constantly with JS like with the 3+ ways to check for NaN and the object "freeze" system that doesn't actually make objects immutable. They take a solid concept from other languages then put a snazzy spin on it that makes it fucking useless. Then try again in the next version. JS library and syntax is littered with corpses of failed experiments.
At least they finally have a usable ForEach loop after three attempts.
Please typescript save us from this hubris.