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

What would make you say that? Why wouldn't you use promises in your business logic?


The idea isn't "don't use promises", it's more "use/chain the promises you already got from libraries (e.g. AJAX calls), don't construct new promises yourself". See the StackOverflow question inglor linked to: https://stackoverflow.com/questions/23803743/what-is-the-exp...


Yeah what dcoder said. You only need to create a promise at the source of an async event like IO. Internal logic will be downstream of IO and therefore will be just be sequencing promises generated elsewhere. You do not (and should not) need to create intermediate promises to do that.




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

Search: