"The promises of functional programming " - Personnal Comments
This article « The Promises of Functional
Programming » was written by Konrad Hinsen and as its title suggests,
prones the benefits of functional programming. The author starts by stating the
history of software programming and the different techniques used for this.
Functional programming has some advantages especially in
concurrency and parallel programming. It can also be used to solve problems in
mathematical modeling.
The basic concept of functional programming is that
computations are made by composing functions. In other kinds of programming,
functions are used to return a value. Another interesting point in functional
programming is the rare use of variables. Indeed functions don’t often change
the value of variables, they process computations.
We can notice another difference between functional
programming and regular programming. Abstractions in functional programming is
prominent because functions are considered as being data. The use of
higher-order functions is very common. Higher-order functions are functions
that take functions as parameters and return also functions. In object-oriented
languages for example, some powerful constructs for data abstraction are added.
The last topic mentionned in this article is concurrency and
parallelism. The advantage that functional programming has is that there are
much fewer shared data memory issues because variables are not common. Indeed one
of the main problem in programming and especially embedded software programming
is that performance and reliability are two fundamentals aspects that require
attention. In order to develop multithreading applications we have to be
careful about the memory access of the different threads and processes. A
variable can’t be modified by one thread and read by another at the same time.
This will cause a conflict that can have importants impacts on the system.
To conclude, I would say that I quite enjoyed this article because
I have understood better the principales of functional programming. I see know the
benefits of it and how I can be more powerful for solving specific problems.
Commentaires
Enregistrer un commentaire