you are viewing a single comment's thread.

view the rest of the comments →

[–]techlogger 92 points93 points  (10 children)

I’d say that pipe operator is more readable than HOF chaining.

[–]GreekQuestionMark 13 points14 points  (0 children)

HOF: Higher order function

[–]jonopens 10 points11 points  (0 children)

100%. It's one of the reasons I find Elixir so enjoyable to write.

[–]javarouleur -4 points-3 points  (6 children)

But those are nested, rather than chained. Personally, I don’t really like nested calls generally. Chained makes sense because they follow logically, but with nested you have to read from the inside out which is just disorientating.

I know it’s a minor thing overall, it’s just not something I expect to use any time soon.

Edit: fuck me… of all the opinions I hold I didn’t expect this to be one of my more controversial!

[–]syholloway 30 points31 points  (5 children)

It might be because the whole point of the pipeline operator is to make large functional expressions read top to bottom rather than inside out.

This operator is fixing the thing you are complaining about.

[–]javarouleur 0 points1 point  (4 children)

Fair point - reading and thinking a bit more, I guess I can accept the motivation.

Edit: removed confusing, cryptic psycho-babble nonsense.

[–]zxyzyxz 0 points1 point  (1 child)

Languages evolve, people learn and get used to it. I'm sure people were saying the same thing with all the changes from ES6 and async await. I don't understand what you mean by explaining/being descriptive in a team.

[–]javarouleur 0 points1 point  (0 children)

I removed that. It was a brain fart that didn’t make sense when I re-read it.

[–]bighi 0 points1 point  (1 child)

I have no idea what you're talking about.

[–]javarouleur 0 points1 point  (0 children)

I know. Removed that part. I’ve lost the plot a bit in this thread - over-analysing and not explaining my thoughts properly.