Skip to content
Elia Cogodi edited this page Jul 12, 2014 · 1 revision

F wiki

Rationale for yet-another-async-flow-library

Step is neat and svelte, but has a few quirks I found unpleasant

  • by returning sequence functions, F is intended to build nestable code blocks, doing away with wrapping Step in functions and passing arguments through closures
  • expecting the continuation callback as last argument, most node-styled functions can be dropped in place as a sequence step
  • this is freed for use as a persistent state

On the other hand Async offers a lot more: looping constructs, mapping, retries, worker queues, etc. Along with what you need, though, comes a lot you won't use at the same time, or that would better be replaced by different, more focused tools. Also, you aren't always given complete control over the execution: what if we need an async.map that doesn't end at first error, or ends as soon as we got k results out of n?

  • by starting with an elementary core of features on which helpers and augmentations are built, F aims at letting you define or reuse exactly the constructs you need
Clone this wiki locally