A paradigm is a different way to solve problems. We can link the concept of a paradigm to the concept of a map, since to get from one point to another, we have an infinite number of paths we can choose… and the paradigm is responsible for telling us where to go to get from one place to another. Paradigms are programming styles, not personal ones, but already documented styles depending on the need to be solved or the place to go.
Programming languages have adopted paradigms, and nowadays, there are languages that have only one paradigm and others that are multi-paradigm languages.
1. Imperative: The programming that tells what needs to be done, detailing step by step. In the code, the step by step of all program’s actions is written.
2. Declarative: The programming where you tell the system what it’ll do or what you expect it to do, and you don’t know how but it already does so. There are already methods and functions underneath that do that without having to define it.
Types of paradigms
1. Structured or sequential: This is likely the type of paradigm with which we all learn to program. It’s based on stating instructions in sequence, from top to bottom. It’s very easy to learn, but this has its limits, especially in large apps.
2. Object-oriented: It divides the system or software that is being developed in entities called objects, which have features and functions. Then, entities connect between them to create an app. If something fails, this makes it easier to know which of these objects is causing the problem. This allows the creation of large apps.
3. Functional: It also divides the system in several pieces like the above type, but the difference is that each entity is a function that does only one thing. Then, data is passed between functions and everything is sent through them.
4. Reactive: Programming in which changes in a stream of data that is constantly moving have to be observed to act a posteriori; that is to say, one must react to changes in the data stream.
Thank you very much for getting here. We hope this material has been useful! If so, don’t forget to share the blog with your colleagues, like the post on social media or comment on your return.