15-09-2017, 11:13 AM
Programming paradigms are a way of classifying programming languages based on their characteristics. Languages can be classified into multiple paradigms. Some paradigms refer mainly to the implications for the language execution model, such as allowing side effects, or if the sequence of operations is defined by the execution model. Other paradigms refer mainly to the way the code is organized, such as grouping a code into units along with the state that is modified by the code. However, others are primarily concerned with the style of syntax and grammar.
Common programming paradigms include:
• imperative that allows side effects,
• functional that does not allow side effects,
• declarative that does not indicate the order in which the operations execute,
• object-oriented grouping of the code along with the state that the code modifies,
• procedure that groups the code into functions,
• logic that has a particular style of execution model coupled to a particular style of syntax and grammar, and
• symbolic programming that has a particular style of syntax and grammar.
For example, languages that fall into the imperative paradigm have two main characteristics: they indicate the order in which operations occur, with constructs that explicitly control that order, and allow side effects, in which the state can be modified in a moment given, within a unit of code, and then read at a different time within a different code unit. Communication between units of code is not explicit. Meanwhile, in object-oriented programming, code is organized into objects that contain a state that is only modified by the code that is part of the object. Most object-oriented languages are also imperative languages. By contrast, languages that conform to the declarative paradigm do not indicate the order in which operations are executed. Instead, they provide a series of operations that are available in the system, along with the conditions under which each is allowed to run. The implementation of the language execution model controls operations that are free to execute and chooses the order itself. More in Comparison of multi-paradigm programming languages.
Common programming paradigms include:
• imperative that allows side effects,
• functional that does not allow side effects,
• declarative that does not indicate the order in which the operations execute,
• object-oriented grouping of the code along with the state that the code modifies,
• procedure that groups the code into functions,
• logic that has a particular style of execution model coupled to a particular style of syntax and grammar, and
• symbolic programming that has a particular style of syntax and grammar.
For example, languages that fall into the imperative paradigm have two main characteristics: they indicate the order in which operations occur, with constructs that explicitly control that order, and allow side effects, in which the state can be modified in a moment given, within a unit of code, and then read at a different time within a different code unit. Communication between units of code is not explicit. Meanwhile, in object-oriented programming, code is organized into objects that contain a state that is only modified by the code that is part of the object. Most object-oriented languages are also imperative languages. By contrast, languages that conform to the declarative paradigm do not indicate the order in which operations are executed. Instead, they provide a series of operations that are available in the system, along with the conditions under which each is allowed to run. The implementation of the language execution model controls operations that are free to execute and chooses the order itself. More in Comparison of multi-paradigm programming languages.