Message from JavaScript discussions

January 2019

— And they do

— 

fs.readFile(filename, (err, data) => {
// ...
});


Do you think there is a timer involved here? There isn't

— 

http.get(url, (err, data) => {
// ...
});


What about this?

— No timers

— And what's even nicer: callbacks are actually composable

— I dont get what are you trying to prove🤤 ye, okay, callbacks for events

— 

const o = (f, g) => (...a, cb) =>
g(...a, (err, data) =>
err
? cb(err)
: f(data, (err, data) =>
err
? cb(err)
: cb(null, data)));

Message permanent page

— Sure, less pretty since errors don't automatically get handled

— But better than threading primitives

— Yes, so no timers

— It's a better system

— Notify me when you're done
vs
Let me check every n milliseconds if it's done