Echo JS 0.11.0

<~>
MaxArt 2920 days ago. link 1 point
"Immediate-execution is a side-effect"

How can a well-defined core behavior be considered a "side effect"?
I might concede that merily passing a function to a constructor isn't usually expected to imply that such function is immediately called (it's also why the "deferred paradigm" is usually preferred), but that's how it is.

Anyway, synchronous code can always be made asynchronous, but not the other way around (unless you're counting await as a way). The main point of promises is their resolution/rejection always happening as the next micro-task, even if they're called synchronously.

Replies

heni 2920 days ago. link 1 point
Unlike the eagerness of Promises, Futures are lazy.