Hacker News new | ask | show | jobs
by stupejr 4683 days ago
At least for java, when your software library exists in the cloud, I don't see how you could avoid using callbacks.
1 comments

This is possible if the language supports coroutines like python (see twisted's inline callbacks) or my port to Lua for Luvit: https://github.com/kans/luvit-inlineCallbacks.

Personally, I think raw callbacks are the right thing 95% of the time. yield/async/coroutines are needed for branching async logic where otherwise you'd be forced to make a new function for each branch and deal with the spaghetti at the end.