Naveen Chawla (2017-08-25T11:41:17.000Z)
Aw, snap! I've written up a much shorter proposal myself. I do think
composition should be in-order of call, i.e.

```
const composed = a |> b |> c  //c(b(a(f)))
```
Reads "do a `then` b `then` c"

The advantage is that no-param calls can also be easily chained using the
syntax:

```
const switchOnTheEngineThenDrive = switchOnTheEngine |> drive
```

I also don't think the reverse operator should be allowed. I think it
compromises readability and could introduce confusion.

I've written my shorter proposal here:
https://github.com/TheNavigateur/proposal-pipeline-operator-for-function-composition


On Fri, 25 Aug 2017 at 16:56 Naveen Chawla <naveen.chwl at gmail.com> wrote:

> On Fri, 25 Aug 2017 at 12:24 Claude Pache <claude.pache at gmail.com> wrote:
>
>>
>> > Le 24 août 2017 à 23:13, Naveen Chawla <naveen.chwl at gmail.com> a écrit
>> :
>> >
>> > That's a syntax for calling functions, not creating a composed function
>> for being called any time.
>> >
>> > Personally I don't find that proposal compelling because I don't think
>> it saves much code vs current syntax - it only straightens the order and
>> replaces () with using |>.
>>
>> Straightening the order is still a big deal in lengthy expressions. And
>> imbalance of nesting parentheses is one of my main sources of syntax errors.
>>
>>
> Yes I think this applies in cases of function composition. My point was
> that it doesn't save much code, especially in comparison to allowing `|>`
> to be used directly as a function composition operator, which would give
> you the linearity you could want, as well as adding a whole dimension of
> expressive power to the language, instead of just allowing a re-ordered way
> of writing existing syntax.
>
>
>> —Claude
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170825/119846bd/attachment.html>
naveen.chwl at gmail.com (2017-08-25T13:32:58.140Z)
Aw, snap! I've written up a much shorter proposal myself. I do think
composition should be in-order of call, i.e.

```
const composed = a |> b |> c  //c(b(a(f)))
```
Reads "do a `then` b `then` c"

The advantage is that no-param calls can also be easily chained using the
syntax:

```
const switchOnTheEngineThenDrive = switchOnTheEngine |> drive
```

I also don't think the reverse operator should be allowed. I think it
compromises readability and could introduce confusion.

I've written my shorter proposal here: https://github.com/TheNavigateur/proposal-pipeline-operator-for-function-composition