I work in a python shop now, and the code I've written the last years must be the ugliest of my career. If it's too complicated to be solved with a list comprehension, it will be so much uglier than lambdas in a language with a form of piping.
I work in a python shop now, and the code I've written the last years must be the ugliest of my career. If it's too complicated to be solved with a list comprehension, it will be so much uglier than lambdas in a language with a form of piping.
What does that even mean?
Sure there are times that a need for performance calls for mutable data. But for me those times are pretty rare, and when they happen it's usually easy enough to quarantine the mutation.
That's exactly how lambdas (and all functions) work in actually functional languages like Haskell. And it's a good thing,lambdas shouldn't allow statements.
> how you can't pipe/chain things
Ironically after switching from Elixir to a language where I can have any operator I wish, I found myself using the equivalent of Elixir's |> only on a very rare occasion. IMO they're vastly overrated.
And it doesn't have to be the pipe operator, just something similar. Like list.map().filter().reduce() instead of reduce(filter(map(list))) which quickly gets unwindly.
It can sometimes be annoying yes, but when you come back to the code 6 months later it's mostly a good thing.