sábado, 6 de octubre de 2018

The promises of functional programming

The promises of functional programming

Computer technology has dvanced since its beginnungs, however programming techniques have pretty much remained the same. IO burst, followd by a CPU burst and then another IO burst. But there is another technique developed in 1950s as a programming techniques and it is called functional programming.

Functional programming is not very know or used because it's commonly used for research and not for real-life programs. Recently it has gained more popularity because it has advantages for concurrent and parallel programs and it provides a simple way to test programs.
Functional programming is used by computing functions by mapping input values to output values. The only task should be to return the same output when given the same input without side effects. One important part of functional programming is that as functions don' need to write in memory, variables are not needed. This may sound as a problem but the computation of a value is much easier. 

Functional programming uses abstraction very prominent so we use what we call a higher-order function that uses another function as a parameter and returns another functions as a result. This makes it very usefur to implement repeated patterns inside an algorithm.

Concurrency and parallelism are gaining importance since single threaded performance is not improving nor moving forward as it should. Also computer hardware is becoming more powerful to a point where it becomes almost impossible to improve more. These concepts are sometimes very hard to work on using traditional programming. Therefore enters functional programming.

No hay comentarios:

Publicar un comentario