Functional Programming – Is It Strongly Related to Mathematics?

functional programmingmathscala

Is functional programming so related to mathematics because much of the functional programming is depicted with mathematical notions? Is it a MUST to have a strong base of
maths to learn & understand functional programming for a programmer with a imperative background?

Best Answer

All programming is related to mathematics. Indeed many universities still place their computer science programs under the purview of the mathematics department.

As for learning functional programming, you do not need to have a strong base in mathematics to learn it. I've learnt three different functional languages now to reasonable proficiency (Haskell, Erlang, Clojure) and my own maths skills are extremely weak. Haskell's community can, indeed, get a little bit annoying in its maths-focused way of speaking about things, but Erlang and Clojure both are very pragmatic functional programming languages that are not that hard to pick up because the tutorial information is written, seemingly, for programmers, not hard-core maths geeks. That being said, despite my handicap in maths I did pick up Haskell, so it's not impossible.

The real difficulty I've found in picking up declarative programming languages in general (of which functional is a subset) is giving up that urge to be in control; to tell the computer what to do. It takes some getting used to.