miércoles, 2 de marzo de 2016

The Promises of Functional Programming

Now on this entry we're going to talk about The Promises of Functional Programming because Clojure is one of those and it's important to get know more about it. First of all the article have the purpose to show us the advantages of use it, because it will make our programs more compacts, but this have a price and with price I mean an effort. In contrast with tradicional programming that is also known as imperative programming is easier to test and helps to concurrent and parallel programming.
Functional Programming have as fundamental principle functions, these functions have to be pure functions, that means free from side effects.
An example of these is recursion, that replaces loops, personally I like recursion more than loops, because is a compact way to program and you don't need more variables. But I'm conscious that there are problems that it's better use loops. Sometimes I think that side effects are bad and we need to avoid them, but the article gave another point of view that if you want your program interact with the real life, you'll need side effects.
And finally we'll talk about concurrency and parallelism, the first one means the execution of several threads operating on the same data and the second the division of a computational task into multiple processes running in parallel. Both could be the future, even though concurrency have a problem on maintaining data in a coherent state.
In conclusion, these article helped me to complement the classes, because it's has so many concepts that help us to know how it works and it's advantages and a little bit of history. Although I keep learning from these, sometimes I don't get use to define variables, but I like the shorter the code is, making it more readable. So invite all, to use and test these language

No hay comentarios:

Publicar un comentario