the promises of functional
programming
This time, this entry will talk about an article of Konrad Hinsen named
as the title of this blog says.
TO understand this, there is a little bit of history about functional
programming and an explanation of how it works or how is different from
traditional imperative programming.
The functional programming works by composing functions and a great
difference from traditional languages is that there is not usage of variables.
An important thing Konrad said is about the usage of concurrent and
parallel programming. Actually, as the computers get more and more powerful,
the usage of this two is more important. But there is not always that easy,
each one has their own problem. For the parallelization the difficulties
are "identifying independent computations inside a program and
coordinating them with the required communication operations" and for
concurrency, as you work with different threads, you have to know how to synchronize
them with "locks" (you stop other threads until each thread are not
being used) in order to modified data items. Before, in another class, I’ve
tried to use concurrency in C language, and it was not that difficult to
coordinate all threads, but as the author said, if you miss something or if you
do something wrong, errors will occur easily. So is very important to have this
in mind when we are programming and to know which parts of the programs you can
use them.
I think that is very important to
learn how to use the parallelization and the concurrency because as we will
have powerful machines, we need to take advantage of the processors we have,
and use that methods to improve our codes, no matter which language you use,
the implementation of them are included in traditional languages as Java or C,
or in this case Clojure.
No hay comentarios:
Publicar un comentario