I wonder if there is a way to revive the proposal...
let newScore = fetch(url)
|> await #
|> #.json()
|> await #
|> #.ID; let newScore = (await (await fetch(url)).json()).ID
and no, a myriad of intermediate variables is not always a nice alternative. This syntax gives a clear view of what happens to the data without having to untangle deeps expressions. I like it. let newScore = fetch(url)
|> await
|> r => r.json()
|> await
|> obj => obj.ID;I'm curious how others read it.
This is clear as day, and I haven't even read the proposal...
That's also hoping your code map files and your browser work well together, which is often not the case. Transpiled code is always a pain to debug at one point or another.
And that's just one line, a code back "full of those" will let you do the dance again and again. A very slow dance at that, cause babel is not the fastest horse in town.
Finally I'll pray your intern doesn't have to do it. But we all have teams full of good programmers right ?
Debugging is an issue though. I commonly find myself splitting up the pipes into section in order to inspect the results and find exceptions. Breakpoints and stepping through code is probably the features I most often struggle with.
The pipeline proposal has multiple syntaxes right now that the community is trying to pick from and discuss.
The chances that the F#-style syntax will be chosen AND will make it to the language proper unchanged is VERY low in my opinion.
And if the community goes in a different direction, it's unlikely that the F# style will be maintained for all that long because it's still such an early stage proposal.
Well working Codemods are difficult to make in many cases, and unless someone is paying for it, I don't think there will be many calls for one to translate between the syntaxes unless the proposal gains a lot of usage without settling on one.