In this article we will look at what a programming paradigm is for information purposes and give some examples.
The first generations of computers were programmed using machine language, i.e. a sequence of instructions was given that the machine understood. As it was difficult to remember the codes of these instructions, the Assembler language was created, which also consisted of a set of instructions for the machine, but written with words simple to remember.
With advances in technology, programming languages emerged, allowing programmers to increase the level of abstraction and solve more complex problems.
What is a Programming Paradigm?
Programming in high-level languages can take several forms, i.e. we can tackle problem solving from different angles.
There are different ways of designing a language and various ways of working to get the results that programmers need. These ways of thinking or working are called PROGRAMMING LANGUAGE PARADIGM.
A continuación vamos a mencionar algunos de estos paradigmas.
Programs consist of a succession of instructions or commands, as if the programmer were giving specific commands.
This is the simplest way to attack problems, but it becomes inefficient when problems are complex.
This paradigm, as its name indicates, is based on logical thinking, which is natural for us to understand. Using logic, complex problems can be expressed in a formal way, elaborating premises and then applying hypotheses, axioms and theorems for resolution.
Logical programming is optimal in artificial intelligence applications. The Prolog language uses this paradigm.
This paradigm consists of creating functions that solve a certain type of problems and then calling them when needed. These functions may contain other functions within them.
Some languages that use this paradigm are Haskell and Python.
Object Oriented Paradigm
In this paradigm models of objects are constructed, which are abstract entities that have defined a set of data and functions inside.
Some languages that use this paradigm are C++, Java and C#.