The promises of functional programming
The article starts exposing in certain way how are related the advances in hardware and the advances in software, explaining that the development of more powerful hardware permits the development of more complex software. Regardless of the easier way to implement and run imperative code, the advantages of functional code and his capability of concurrent and parallel programming, keep this coding technique’s fame. Also, the easier way to test this kind of code help too. The fundamental principle of functional programming is explained as “the mapping from input values to output values”, and is important to understand this, to understand the next explanation, the functional programming doesn’t work with variables, it works with functions, functions that aren’t supposed to change variables, and doesn’t have side effects.
The functional programming considers functions as data, this means that we have functions that call functions or return functions as parameters. The promise of the functional programming is basically, the concurrency and the parallelism. The first one refers to the capability to have in existence several execution threads operating on the same data, this means, that we could be capable to work at the same time with the same data in different environments. In other hand, the parallelism means to the division of computational task into multiple communicating processes running in parallel, which means that the work that the computer needs to do, in this case can be divided and distributed into different processors to reduce the time needed to produce a result.
These two characteristics are powerful tools that may be someday the key to archive more computational power and speed, and maybe the structural and object-oriented programming will be totally replaced with this new kind of languages. And these techniques will allow us to maximize the power and use of the multiple cores architectures.
Comentarios
Publicar un comentario