by _nothing · 5y ago · 0 comments
It seems to me that one of the benefits of the pipe operator is that it very clearly lays out the steps involved, aka
x
|> maybe_function()
|> final_function()
so that the code is dead-simple and clear. It doesn't seem nested in the say way that final_function(maybe_function(X)) is.Granted, I don't have nearly the level of experience of the author so I can't say for sure, but it seems to me like they just haven't had enough experience with the pipe operator to see how it benefits the code "beauty".
foo(X) ->
Y = maybe_function(X),
final_function(Y).
Both, in my eyes, yield a declarative flow without mutations and overwriting variables