The "Pipeline" Operator - Making multiple function calls look great

Bruno Jouhier bjouhier at gmail.com
Mon Dec 14 13:05:56 UTC 2015


`await` could be handled by with contextual lexing: handling `|> await` as
a single keyword.

Another solution would be to collapse the two into a variant of the
pipeline operator: `|await>`, `|!>`, ...

This could be an opportunity to revive the syntax sugar that was proposed
in http://wiki.ecmascript.org/doku.php?id=strawman:concurrency

```js
// concurrency strawman
lines = fs.readFile!('./index.txt').split('\n');
// pipeline operator
lines = './index.txt' |!> fs.readFile |> str => str.split('\n')
```
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20151214/b33c57c3/attachment.html>


More information about the es-discuss mailing list