lunes, 10 de octubre de 2016

The promises of functional programming

The promises of functional programming


It is fun how the way we make programs has change in a relative short time but in most of one way it continues in basically the same way.

I like clojure, but to be completly honest I am sure it was really difficult to learn, the most of languages are basically an implementación of the same way to make functions, in the strict and nonstrict idea of the word but you have variables and loops and is similar to the basic way to think, definitely Lisp children takes you out of your confort zone… honestly at some point in the first contact whit Clojure I thought that It will not have more ways to do cycles than recursion and that terrorized me. Now I think learning Lisp requires thinking different and lot of effort.

About the functional programming, well, by definition a function takes some data and every time you give the same arguments the function will give you the same output and it works specially when you are trying to identify and implement patterns of an algorithm or like the obvious implementation, make mathematical programs for make fast a process.

Now, Why functional programming?

 Because you can … well yes, because you can do (in a easy way) parallel programming and be carefull with concurrency.

Usually is completely normal to have (lots ?) troubles with variables. maintaining the data in a correct state depends of the thread that tries to modify data and what happen when another one is accessing for reading or writing at the same time.


The problema is that data is often corrupted by other threads but if you are not able to change the value of the (I know those are not variables but i do not know how to name them) variables, well you are save.

No hay comentarios:

Publicar un comentario