DEV Community

Discussion on: Does Functional Programming Make Your Code Hard To Read?

Collapse
 
iquardt profile image
Iven Marquardt

Any programming language that you don’t know will feel alien at first glance

I agree. Additionally, in FP it is not only an unfamiliar syntax but the entire approach is unfamiliar.

However, the next statement somehow contradicts your previous one:

you’re also trying to keep track of the flow of control through the functions as they are combined

As soon as you are familiar with the functional paradigm you recognize that there are a couple of very basic, very general recurring patterns. You can simply follow such code, as long as it well written. You can write good or bad functional code, of course, just like you can write good or bad imperative one.

If somebody claims with FP all your problems vanish, they are baised. If somebody claims FP magically reduces complexity, again, they are baised. In my opinion FP allows us to express/encode our intentions with the most universal, most general language people happened to discover: Math. That's all about it.

Collapse
 
david_whitney profile image
David Whitney

you’re also trying to keep track of the flow of control through the functions as they are combined

In this I meant, "as a reader" if you're trying to mentally trace your path through the combination of functions, you, as a human, are doing the combining of functions mentally.

FP allows us to express/encode our intentions with the most universal, most general language people happened to discover: Math. That's all about it.

Absolutely - it's a constrained style of programming, with advantages and disadvantages :)