Popular Programming Paradigms in 2020
Popular Programming Paradigms in 2020
In simple terms, a paradigm is a model or a school of thoughts that have distinct patterns, frameworks, features, and style to help you solve a particular problem. A programming paradigm is an approach to group different programming languages based on their design, behavior, features, and applications.
There are 256 programming languages; each of them has emerged from the other with a combination of many programming paradigms. Some languages support only one programming paradigm like Haskell supports only the functional paradigm.
While some languages support more than one programming paradigm like Python and Ruby are built on an object-oriented paradigm, but they support functional paradigms as well.
Popular Programming Paradigms in 2020:
Here are 14 programming paradigms that are most COMMON with computer languages:
- Imperative programming
From Latin, IMPERARE means command. It is the oldest programming paradigm. A program based on an imperative paradigm is a sequence of instructions telling the computer what and when to perform a task, in order to get desired results. C, C++, C#, python, ruby, java, and FORTRAN are imperative programming languages.
2. Declarative programming
This paradigm always describes the end results rather than outlining the intermediate work steps. The solution path is determined is automatic. Declarative programming is very efficient if two conditions are met: Specifications of the final state are clearly defined and a proper implementation method exists. Prolog, ERLANG, SQL, and Lisp are declarative programming languages.
3. Structured programming
It is also known as modular programming. This programming paradigm allows the execution of instructions in a structured manner by using flow constructs of selection (if/then/else), repetition structures (while/for), and subroutines (functions). It does not support jumping from one instruction to another by using the GOTO statement. C, C++, C#, and Java are structured programming languages.
4. Procedural programming
This paradigm is derived from a structured programming paradigm. It is based on the concept of procedural calls. Procedures are also known as functions, routines, or sub-routines. A procedure contains a series of procedural steps to be carried out. FORTRAN, COBOL, and C are procedural programming languages.
5. Functional programming
It is a type of declarative programming paradigm. This paradigm uses expressions instead of statements. Here, the main focus is on “what to solve”. Statements are executed to assign variables whereas expressions are evaluated to provide a value whereas. Python, Lisp, Haskell, and CLOJURE are functional programming languages.
6. Function-Level programming
It is a constrained type of functional programming. In this paradigm, the program is built from elementary functions that are combined with function-to-function operations. The function-Level paradigm focuses on the study of functional forms and does not use the concept of variable or assignment. It is the opposite of value-level programming. FP, APL, and J are function-level programming languages.
7. Object Oriented programming
This paradigm is based on the concept of class and object. OOP paradigm contains two things: data in the form of fields and code in the form of procedures. It aims to provide modularity and reusability. C++, C#, Java, PHP, Python, Ruby, and Pearl are object-oriented programming languages.
8. Event-driven programming
In this paradigm, the flow of a program is determined by events such as sensor outputs, user actions or messages from other applications. Currently, it is the default paradigm in software engineering. An event can be something like picking an option from the drop-down menu, clicking on a specific button, giving voice commands, uploading a video, typing text into a field or system-generated events such as program loading, etc. Event-driven programming can be practiced with any programming language. Visual Basic, Visual C++, and Java are most popular with event-driven programming.
9. Logic programming
This paradigm is largely based on formal logic. A program based on the logic programming paradigm is a set of sentences in logical form, showing facts and rules about some problem domain. Prolog, DATALOG, and Answer Set Programming (ASP) are popular logic programming languages.
10. Constraint programming
This paradigm was developed by the computer science and Artificial Intelligence community to solve Constraint Satisfaction Problems (CSPs). It has proven to be a very successful technique for reasoning about assignment problems. The constraint Programming paradigm mainly focuses on combinatorial problem-solving in the field of AI, computer science, and operations research. Prolog is a popular language with constraint logic programming.
11. Flow-driven programming
This paradigm defines applications as networks of black-box processes, where data is exchanged across pre-defined connections by message passing. Here, connections are specified externally to the processes. S-LANG (Stream language) is a flow-driven programming language.
12. Aspect-Oriented programming
This paradigm allows separation of cross-cutting concerns, thus aims to increase modularity. Program logic is broken down into distinct parts called concerns (major areas of functionality). This approach reduces code clutter and improves readability and maintainability of code. Aspect-Oriented Paradigm (AOP) can be implemented with PHP programming languages as a few PHP-based AOP frameworks exist.
13. Reflective programming
In terms of computer science, reflection is the ability of a process to introspect, examine, and modify its own structure and behavior. Programs based on this paradigm have an integral ability to observe or change its code at run time. Dynamically typed languages: PHP, Python, VB Script, JavaScript, and Perl support reflection concept.
14. Array programming
It is the high-level programming paradigm. It generalizes certain operations that can be applied to an array of values at once rather than to individual values one at a time. Such a paradigm is commonly used in scientific and engineering fields. Powerful array operators reduce the need for loop structure in code. FORTRAN, APL, J, MATLAB, S-LANG, JULIA, and ANALYTICA are array programming languages.
Popular Programming Paradigms in 2020: Let’s have a look at some MAJOR Programming Paradigms in detail: