The Promises of Functional Programming
Over the
time, the computer hardware, and thus, the programming languages have been
evolving in order to make more robust software solutions. Although, there are
some things that have changed, the overall idea is the same. For all programs,
the idea is to read data from the memory and apply to them basic operations,
and finally get the expected result from a cell of the memory. So, traditional
programming is the most used today, though functional programming have been
used by researchers for many years, it just starts to be popular. The reason is
that functional and traditional programming are very different and programmers
should learn and unlearn some concepts that don’t exist in the other one. But,
functional programming let you to write more robust software and is easier to
test. Moreover, it has advantages over imperative for concurrent and parallel
programs.
Basically,
the functional programming consists in realize the computation by functions, as
we see in Math, a mapping from input to output. Also a function should return
always the same value given an input. So, what we traditionally know as a
function in the most of the languages are only subroutines. Another different
thing is that functional programming doesn’t use variables. Also, it doesn’t have
loops, instead it manages recursion that means that the function is going to
call itself. So, there is a lot of concepts that both ways of programming don’t
share. Therefore, programmers should change the way they think in order to
solve a problem. I think that this what causes the friction between programmers
and functional programming, because as we see it is very useful and it give us
a lot of advantages, but the programmers resisted to change. Nevertheless, it
is becoming popular and I think that over time, more and more will use it.
Comentarios
Publicar un comentario