miércoles, 2 de marzo de 2016

Comments on "The promises of functional programming"

There are many functional programming languages in the industry, Clojure, LISP are some examples of such languages. These type of programming languages can sometimes become very useful, when we want to solve a specific problem. Sometimes using a functional programming language may not be the best option for solving a problem. We must analyse the problem we want to solve before choosing a functional programming language.

Functional programming languages allow us to solve mathematical programs using threads, the evolution of technology, has limited the amount of resources available in a computer to solve and execute instructions, the new solution to this recently has been adding multiple cores to processor to make the processing capabilities of a computer much higher.

There are many difference between the imperative type of programming and the functional programming languages. One of the main difference is that functional programming languages have no variable types, such variables are immutable because there are bindings that can’t store values.
Another main difference is that functional programming languages don’t use loops, they are designed to use recursion in order to reduce the execution time for a given problem that demands a lot of resources.

Finally another difference, is that functional programming languages are composed by functions which will in every situation yield the same result to and specific output. This results in side effects that are produced by the program, in order to maintain the natural flow of a functional programming language.

Functional languages are very good options if we want to write programs that solve a problem using parallelism, since bindings are immutable, the race conditions can be avoided, which in a future will avoid the necessity of implementing locks that will result in the absence of deadlocks.

The negative side of using functional programming languages, is that they are not very commonly used and compilers don’t produce very effective parallel executable code.

No hay comentarios.:

Publicar un comentario