4 ms·
There was a pretty elegant post on how Python's coroutines can replace callback hell with almost-synchronous-looking async code on HN the other day: https://new
by 0x0 11y ago
There was a pretty elegant post on how Python's coroutines can replace callback hell with almost-synchronous-looking async code on HN the other day: https://news.ycombinator.com/item?id=10220712 https://news.ycombinator.com/item?id=10220712
Wonder if something similar will catch on in the node ecosystem?
- lastofus 11y agoEveryone forgets that Gevent has been around for years, and lets you write completely synchronous looking async code.
- vangale 11y agoI think a better way of looking at it is there isn't enough "cross pollination" in big open-source frameworks and languages.
- M2Ys4U 11y agopromises, async functions and generators will make writing async code look more sync in javascript/node. Whether or not this is a good thing or not, I'm undecided.
- supster 11y agoYeah ES7 has async and await which are pretty similar to that source: http://www.sitepoint.com/simplifying-asynchronous-coding-es7-async-functions/ http://www.sitepoint.com/simplifying-asynchronous-coding-es7...