|
|
|
|
|
by guccimane
5172 days ago
|
|
Oh, stop. I'm tired of hearing about "smug" being the worst thing ever. Too easy to toss this insult around. Instead, personally my issue with functional programming is the aversion to side effects. It seems to cause a lot of weird contortions, when the whole reason we make software in the first place is for the side effects. Programming in a functional style brings with it a lot of wonderful, powerful ideas. But that one has always struck me as unfortunate. |
|
I find that the aversion to side effects even when working in imperative languages is one of the most useful things I've learned from functional programming.
It is true that, at one level of abstraction, we write programs for their side effects. However, it is also true that having the right side effects is extremely important - so important that a program with the wrong side effects can easily be worse than no program at all. From that perspective, a focus on minimizing, containing and controlling side effects is very valuable. And an aversion to side effects is a good way to sharpen your focus on that.