Re:Learning Go by porting a medium-sized web back end from P...
by joshuamorton on Thursday November 09, 2017 @12:37PM
(#15664233)
Async/await coroutines (C#, python, ECMAscript 7) are much nicer than futures, at least ime. I think that in terms of expressiveness of async code it goes
callbacks -> futures/promises -> coroutines
Because callbacks are a completely different style of code, your async looks totally different. Futures and promises are better, but still make it difficult to ever break out of the async context, coroutines make the difference between async and normal code nonexistant, and allow clean escape from an async context.
callbacks -> futures/promises -> coroutines
Because callbacks are a completely different style of code, your async looks totally different. Futures and promises are better, but still make it difficult to ever break out of the async context, coroutines make the difference between async and normal code nonexistant, and allow clean escape from an async context.