Re:Two Vexing Problems in Functional Programming
by jerf on Friday April 01, 2022 @12:17PM
(#30879842)
Tried saying it politely. Still get downvoted. Thought I'd try a bit sharper on purpose.
Despite what it may superficially sounds like, it's an attempt to reach out and help people. If it hurts, you know, think about it. Maybe don't do something that hurts so much because it "must" be good.
FP techniques in imperative languages is a tool. A good tool sometimes. But it shouldn't be an aspiration.
I love functional idioms as well, but you have to know the cost of those idioms in a non-functional language. The first thing I did when I had to learn go was determine if I could use functional idioms (map, fold, etc.) and did some research and testing and found that, no, functional idioms are a really bad idea in go. It just isn't meant to be used that way.
For the record, I had to learn go because the team I joined used it.