I was just reading a post on the forum about OO vs FP. I’m only a few months into FP from a good 5-year in not-even-OO Ruby/Rails. One argument I’ve seen against OO is the inherent mutation of data.
But I’ve been doing this quite often:
myResult |> returnTransformedData |> doSomethingWithTransformedData |> logTransformedData
And so the later functions are relying on the returns from the earlier functions. But if I pass the same data into each function, then I’m repeating the transformation (unless I stored its state). Having trouble reconciling this dependence on these returns with data mutation in OO, and unsure if I’m carrying over a bad habit.