Secondary Menu

Tag Archives: functional languages

With a FP language many problems can be solved with elegantly less code and less-code leads to less-bugs.

Functional Programming (FP) insider know that, because they have personally experienced it. This can be tweeted and blogged many times, but how can others believe this? How do you prove it?

That problem inspired me to do some investigation. We need facts. What I’ve found so far are two studies that show this from a data analysis side. There is some evidence that both is true, according to these newer papers from 2014, based on data analysis of source code and its history from Github and from Rosetta Code :

“Functional languages have a smaller relationship to defects than other language classes where as procedural languages”— [1] A Large Scale Study of Programming Languages and Code Quality in Github

I think the “less code” property is underestimated, because the too easy Lines of Code (LOC) counting isridiculed. Looking beyond the LOC of the code base to the more important depending consequences :

less code -> less to read (more often than write!) and understand -> less to review -> less to communicate -> less to refactor -> less to test -> less bugs -> less to maintain -> less cost!!!