Comment

Comment by z3t4

I find callbacks and events much easier to understand then promises and futures. Example code:

  var req = get("https://news.ycombinator.com")
  req.onData = callbackFunction
  if(condition) req.abort()
"Callback hell" can be avoided by using named functions and sub-functions.
parent z3t4 9 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton