2 ms·
Functional programming has instilled in me a belief that I call "You don't have to punch yourself in the face." The premise is this: you have two arms and two
by rcme 4y ago
Functional programming has instilled in me a belief that I call "You don't have to punch yourself in the face."
The premise is this: you have two arms and two hands. They can be used in a controlled manner to do lots of useful things. They can also be swung around in a wild fashion that results in punching yourself in the face.
The concepts functional programming rallies against, like mutable state, are like arms: useful in certain circumstances, dangerous in others. But that's the thing: You don't have to write code in a dangerous way. You don't have to punch yourself in the face. That is to say, functional programming has reinforced my belief in the imperative style of programming.