3 ms·
The other day I watched a self-described functional programmer implement a while loop using this custom-written conditionally recursive function. There was not
by booleandilemma 4y ago
The other day I watched a self-described functional programmer implement a while loop using this custom-written conditionally recursive function.
There was nothing more elegant about it and it wasn't obvious from just looking at the function call what the function was doing. It wasn't any simpler than while(condition){}.
All because he didn't like while loops (and statements in general). It seemed tortuous and unnatural.
FP has some good parts but so does imperative programming, and I think throwing away the good parts of imperative programming and OOP for the sake of "pure" FP is a serious mistake.