First, because of advances in compiler technology, implementations of functional languages are now more efficient than ever. The argument “functional programs are inefficient” isn’t really sensible any more (if it was ever). So why is functional programming unpopular in the “real world”? Consider some non-reasons first. Researchers have also frequently argued that functional program design makes it fundamentally easier to exploit parallelism. This makes it much easier to reason about correctness and security: analyzing the correctness of the composition of procedures A and B can be broken down into analyzing A and analyzing B. In contrast, in functional languages, such side effects are severely limited.
University of minnesota intellij key code#
In imperative languages like C, a line of code within a procedure can affect the entire global state of the program. There are good reasons why PL researchers like functional programming. In particular, functional programming is a significant part of the core programming sequence at only 9 of the top 33 American schools, and is not offered at all in about 40% of these schools. In this post, I show that few universities do. For functional programming to be embraced in the “real world”, universities must teach it.
However, it seems that we academics are at least partly to blame for this state of affairs. An interesting finding was that among the top 20 languages in these rankings, there wasn’t even one functional language.Īcademic PL researchers tend to love functional programming, so many of us would find this fact depressing. As part of a study, the investigators ranked languages according to their frequency of use in Sourceforge projects during the period 2000-2010. A couple of months ago, we posted about the research program of SocioPLT, whose goal is to study why some languages get adopted more than others.