Earlier quoted context omitted.
The thing I dislike about it most is the constantly-rebound % variable. It means something different in each line. In this case they have elected to keep it as a string throughout the pipe, but this ‘more pipey’ version of the code has it start out as an array then turn into a string halfway through the pipe, which feels dangerous (and is presumably why they didn’t take the example this far): Object.keys(envars) |> %…
Not really... F#-style pipeline syntax would be a bit more explicit about it, assuming you could use % for a variable name... Object.keys(envars) |> % => %.map(envar => `${envar}=${envars[envar]}`) |> % => %.join(' ') |> % => `$ ${%}` |> % => chalk.dim(%, 'node', args.join(' ')) |> % => console.log(%); To be honest, I've pretty much given up the hopes that TC39 would actually resolve pipelines and decorators at this…
Reading this version though I also notice something else that the F# style enables that the Hack style doesn’t which is that it supports destructuring. So in F# style, I can more easily make pipe steps that pass on multiple values in a structured object or array, then access them easily down-pipe.