Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Good news as you can now use ES6 generators in Node.js and when combined with another ES6 feature, Promises it can result in much nicer async code e.g. http://taskjs.org/

ES6 is looking very nice indeed, great thing is that with Node you won't have to worry about old browser support.



I never understand the `function *(){}` syntax. Why can't we simply introduce a new keyword like `generator (){}`?


Or just recognize that the function contains the yield keyword. That said, `function*` isn't all that bad given what you get in return.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: