👻 Check our latest review to choose the best laptop for Machine Learning engineers and Deep learning tasks!
Functional style programming focuses on pure math functions, immutable data, logic flow, and data entry. Functional programming languages ​​are the opposite of object-oriented ones, which focus on changing data and changing states.
Functional programming languages ​​are everywhere and the vast majority of internet uses them. In fact, I am right now using a functional programming language to write this article.
Learning what a functional programming language is and knowing its pros and cons is helpful for anyone involved in computing or programming.
Let ’s take a moment to define this programming paradigm (and paradigms in general), then look at some of the pros and cons of functional programming.
What is a programming paradigm?
Since computers are, at their core, machines, we need a good way to communicate with them. However, the more abstract of ones and zeros, the more specialized a language becomes. This is why we have so many high level languages, because they all work a little differently and are all suitable for different tasks.
Enter the programming paradigm, which is a means of classifying programming languages ​​by their central theory or methodology for managing data. Languages qualify for a paradigm by having a set of defining principles. There are many programming paradigms, many of which overlap or contain other paradigms. The two main paradigms are functional and object oriented, but there are many other ways of dealing with data not considered by these two paradigms.
What is functional programming?
Functional programming is one of the two best known programming paradigms , the other object being oriented programming. In short, functional programming focuses on pure mathematical functions and immutable data - that is, data that cannot be changed after it is created. It has no state, which means that the only thing that changes in a functional program is the entry.
Since there has been no state that change with objects, in functional programming you could conceptually change in code order and still have the same output. It’s like multiplying eight numbers together, no matter what order you multiply them, you always get the same result