Functional Programming for Bioinformatics
Python is a multi-paradigm language that allows you to express computations in multiple different ways. It is sometimes called an object-oriented (OO) language: sure, you can write code in an OO dialect, but you can also use other styles. Most code in Python is written in an imperative style: there is no structuring along a class hierarchy, as typical of the OO paradigm, and most code changes state that, for example, if you write x = x + 1
, you are changing the state of variable x
.
If you write complex code, especially code that requires parallel processing, imperative and OO paradigms will hit some limits. For simple scripts that run on a single machine, imperative and OO styles will do fine, but bioinformatics is a big-data enterprise, and you will often need to scale up and scale out, as there is lots of information to process, and many algorithms are computationally heavy.
Functional programming is quite useful for the complex and...