> what's the point of explicitly declaring functions "async", and then explicitly saying "await". IMHO all this could be done automatically by language.
Not without Fibers. Javascript doesn't have Fibers though there an implementation in Nodejs.
What it changes is that you don't have to rely on yet another library anymore to get the behavior people mostly use yield for. I'm talking about co/thunk . While it doesn't solve the red/blue function issue [1], it makes writing async code a bit less tedious.
At the end of the day it will force everybody to return promises from async functions, rather than requiring callbacks,which is a good thing.
Not without Fibers. Javascript doesn't have Fibers though there an implementation in Nodejs.
What it changes is that you don't have to rely on yet another library anymore to get the behavior people mostly use yield for. I'm talking about co/thunk . While it doesn't solve the red/blue function issue [1], it makes writing async code a bit less tedious.
At the end of the day it will force everybody to return promises from async functions, rather than requiring callbacks,which is a good thing.
[1] : http://journal.stuffwithstuff.com/2015/02/01/what-color-is-y...