What have you found for these years?

2013-04-11

Fwd: Node’s biggest missed opportunity

Callbacks are imperative, promises are functional:
Node’s biggest missed opportunity

Those null values returned by callback-based functions are the root of
why programming with callbacks is hard: callback-based functions do not
return anything, and so are hard to compose. A function with no return
value is executed only for its side effects – a function with no return
value or side effects is simply a black hole. So programming with
callbacks is inherently imperative, it is about sequencing the execution
of side-effect-heavy procedures rather than mapping input to output by
function application. It is about manual orchestration of control flow
rather than solving problems through value relationships. It is this
that makes writing correct concurrent programs difficult.

from caasi

0 retries:

Post a Comment

All texts are licensed under CC Attribution 3.0