All Topics  
Programming paradigm

 

   Email Print
   Bookmark   Link






 

Programming paradigm



 
 
A programming paradigm is a fundamental style of computer programming
Computer programming

Computer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language....
. (Compare with a methodology, which is a style of solving specific software engineering
Software engineering

Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches....
 problems). Paradigms differ in the concepts and abstractions used to represent the elements of a program (such as objects, functions, variables, constraints, etc.) and the steps that compose a computation (assignation, evaluation, continuations, data flows, etc.).

class="link1" onMouseover='showByLink("m871446",this)' onMouseout='hide("m871446")'href="http://www.absoluteastronomy.com/topics/Programming_language">programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 can support multiple paradigms
Multi-paradigm programming language

A multi-paradigm programming language is a programming language that supports more than one programming paradigm. As Lead designer Tim Budd holds it: The idea of a multiparadigm language is to provide a framework in which programmers can work in a variety of styles, freely intermixing constructs from different paradigms. The design goal...
.






Discussion
Ask a question about 'Programming paradigm'
Start a new discussion about 'Programming paradigm'
Answer questions from other users
Full Discussion Forum



Encyclopedia


A programming paradigm is a fundamental style of computer programming
Computer programming

Computer programming is the process of writing, testing, debugging/troubleshooting, and maintaining the source code of computer programs. This source code is written in a programming language....
. (Compare with a methodology, which is a style of solving specific software engineering
Software engineering

Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches....
 problems). Paradigms differ in the concepts and abstractions used to represent the elements of a program (such as objects, functions, variables, constraints, etc.) and the steps that compose a computation (assignation, evaluation, continuations, data flows, etc.).

Overview

A programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
 can support multiple paradigms
Multi-paradigm programming language

A multi-paradigm programming language is a programming language that supports more than one programming paradigm. As Lead designer Tim Budd holds it: The idea of a multiparadigm language is to provide a framework in which programmers can work in a variety of styles, freely intermixing constructs from different paradigms. The design goal...
. For example programs written in C++
C++

C++ is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level programming language and low-level programming language language features....
 or Object Pascal
Object Pascal

Object Pascal refers to a branch of Object-oriented programming derivatives of Pascal , mostly known as the primary programming language of CodeGear Delphi....
 can be purely procedural
Procedural programming

Procedural programming can sometimes be used as a synonym for imperative programming , but can also refer to a programming paradigm based upon the concept of the procedure call....
, or purely object-oriented
Object-oriented programming

Object-oriented programming is a programming paradigm that uses "Object_" and their interactions to design applications and computer programs....
, or contain elements of both paradigms. Software designers and programmers decide how to use those paradigm elements.

In object-oriented programming
Object-oriented programming

Object-oriented programming is a programming paradigm that uses "Object_" and their interactions to design applications and computer programs....
, programmers can think of a program as a collection of interacting objects, while in functional programming
Functional programming

In computer science, functional programming is a programming paradigm that treats computation as the evaluation of function s and avoids program state and immutable object data....
 a program can be thought of as a sequence of stateless function evaluations. When programming computers or systems with many processors, process-oriented programming
Process-oriented programming

Process oriented programming is a programming paradigm that separates the concerns of data structures and the concurrent processes that act upon them....
 allows programmers to think about applications as sets of concurrent processes acting upon logically shared data structures.

Just as different groups in software engineering
Software engineering

Software engineering is the application of a systematic, disciplined, quantifiable approach to the development, operation, and maintenance of software, and the study of these approaches....
 advocate different methodologies, different programming languages advocate different programming paradigms. Some languages are designed to support one particular paradigm (Smalltalk
Smalltalk

Smalltalk is an Object-oriented programming, Type system, reflection computer programming programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human?computer symbiosis." It was designed and created in part for educational use, more so for constructionist learning, at PARC by Al...
 supports object-oriented programming, Haskell
Haskell (programming language)

Haskell is a standardized, purely functional programming language with non-strict programming language, named after logician Haskell Curry. The goals of the language are described as:...
 supports functional programming), while other programming languages support multiple paradigms (such as Object Pascal
Object Pascal

Object Pascal refers to a branch of Object-oriented programming derivatives of Pascal , mostly known as the primary programming language of CodeGear Delphi....
, C++
C++

C++ is a general-purpose programming language. It is regarded as a middle-level language, as it comprises a combination of both high-level programming language and low-level programming language language features....
, C#, Visual Basic
Visual Basic

'Visual Basic' is the third-generation programming language event-driven programming and integrated integrated development environment from Microsoft for its Component Object Model programming model....
, Common Lisp
Common Lisp

Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in American National Standards Institute standard document Information Technology - Programming Language - Common Lisp, formerly X3.226-1994 ....
, Scheme, Perl
Perl

In computer programming, Perl is a high-level programming language, List of programming languages by category, Interpreter , dynamic programming language....
,Python
Python (programming language)

Python is a general-purpose high-level programming language. Its design philosophy emphasizes code readability. Python's core syntax and semantics are Minimalism , while the standard library is large and comprehensive....
, Ruby
Ruby (programming language)

Ruby is a dynamic programming language, reflection , general purpose object-oriented programming language that combines syntax inspired by Perl with Smalltalk-like features....
 and Oz).

Many programming paradigms are as well known for what techniques they forbid as for what they enable. For instance, pure functional programming disallows the use of side-effects; structured programming
Structured programming

Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms. It is most famous for removing or reducing reliance on the GOTO Statement ....
 disallows the use of the goto
GOTO

GOTO is a statement found in many computer programming languages. It is a combination of the English words wiktionary:go and wiktionary:to....
 statement. Partly for this reason, new paradigms are often regarded as doctrinaire or overly rigid by those accustomed to earlier styles. Avoiding certain techniques can make it easier to prove theorems about a program's correctness—or simply to understand its behavior.

History


Initially, computers were programmed using binary code
Binary code

Binary code is the system of representing text or Instruction by the use of a two-numerical digit number system. This system is composed of only the number zero, representing the Off state, and the number one, representing on state, combined in groups of 8....
 that represented control sequences fed to the computer CPU. This was difficult and error-prone. Programs written in binary are said to be written in machine code, which is a very low-level
Low-level programming language

In computer science, a low-level programming language is a programming language that provides little or no abstraction from a computer's instruction set architecture....
 programming paradigm.

To make programming easier, assembly languages were developed. These replaced machine code functions with mnemonics and memory addresses with labels. Assembly language programming is also a low-level paradigm although it is a second generation paradigm. Although assembly language is an improvement over machine code, it is still prone to errors, and difficult to debug and maintain.

The next advance was the development of procedural languages. These third-generation languages, the first described as high-level languages
High-level programming language

In computing, a high-level programming language is a programming language with strong Abstraction from the details of the computer. In comparison to low-level programming languages, it may use natural language elements, be easier to use, or more Porting across platforms....
, use vocabulary related to the problem being solved. For example, COBOL
COBOL

COBOL is one of the oldest programming languages still in active use. Its name is an acronym for COmmon Business-Oriented Language, defining its primary domain in business, finance, and administrative systems for companies and governments....
 (Common Business Oriented Language) uses terms like file, move and copy.

FORTRAN
Fortran

Fortran is a general-purpose programming language, procedural programming language, imperative programming language programming language that is especially suited to numerical analysis and scientific computing....
 (FORmula TRANslation) and ALGOL
Algol

Algol , known colloquially as the Demon Star, is a bright star in the constellation Perseus . It is one of the best known eclipsing binary, the first such star to be discovered, and also one of the first variable stars to be discovered....
 (ALGOrithmic Language) were developed mainly for scientific and engineering problems, although one of the ideas behind the development of ALGOL was that it was an appropriate language to define algorithms. BASIC
BASIC

In computer programming, BASIC is a family of high-level programming languages. The Dartmouth BASIC was designed in 1964 by John George Kemeny and Thomas Eugene Kurtz at Dartmouth College in New Hampshire, United States to provide computer access to non-science students....
(Beginners All purpose Symbolic Instruction Code) was developed to enable more people to write programs. All these languages follow the procedural paradigm. That is, they describe, step by step, exactly the procedure that should be followed to solve a problem.

The problem with procedural languages is that it can be difficult to reuse code and to modify solutions when better methods of solution are developed. In order to address these problems, object-oriented languages (like Eiffel
Eiffel (programming language)

Eiffel is an International Organization for Standardization-standardized, object-oriented programming language designed to enable programmers to efficiently develop extensible, reusable, reliable software....
, Smalltalk
Smalltalk

Smalltalk is an Object-oriented programming, Type system, reflection computer programming programming language. Smalltalk was created as the language to underpin the "new world" of computing exemplified by "human?computer symbiosis." It was designed and created in part for educational use, more so for constructionist learning, at PARC by Al...
 and Java
Java (programming language)

Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
) were developed. In these languages data, and methods of manipulating the data, are kept as a single unit called an object. The only way that a user can access the data is via the object's methods. This means that, once an object is fully working, it cannot be corrupted by the user. It also means that the internal workings of an object may be changed without affecting any code that uses the object.

A further advance was made when declarative programming paradigms were developed. In these languages the computer is told what the problem is, not how to solve the problem. Given a database or a set of rules, the computer searches for a solution. In declarative programs, the computer is not given a procedure to follow. Instead, the desired results are described directly. One example is XAML
XAML

Extensible Application Markup Language is a declarative XML-based language created by Microsoft which is used to initialize structured values and objects....
 (pronounced zammel ['zæm??]), a declarative language used to describe user interfaces in Silverlight and WPF
Windows Presentation Foundation

The Windows Presentation Foundation , formerly code-named Avalon, is a graphical subsystem in .NET Framework 3.0 , which uses a markup language, known as Extensible Application Markup Language, for rich user interface development....
.

Another recent programming paradigm is functional programming. Programs written using this paradigm use functions, which may call other functions (including themselves). These functions have inputs and outputs. Variables, as used in procedural languages, are not used in functional languages. Functional languages make a great deal of use of recursion
Recursion (computer science)

Recursion is a way of thinking about and solving problems. In fact, Recursion_ is one of the central ideas of computer science. Solving a problem using recursion means the solution depends on solutions to smaller instances of the same problem....
.

See also

  • Paradigm
    Paradigm

    The word paradigm has been used in linguistics and science to describe distinct concepts.To the 1960s, the word was specific to grammar: the 1900 Merriam-Webster dictionary defines its technical use only in the context of grammar or, in rhetoric, as a term for an illustrative parable or fable....
  • Mindset
    Mindset

    A mindset, in decision theory and systems theory, refers to a set of assumptions, methods or notations held by one or more people or groups of people which is so established that it creates a powerful incentive within these people or groups to continue to adopt or accept prior behaviours, choices, or tools....
  • Turing completeness
    Turing completeness

    In Computability theory , several closely-related terms are used to describe the "computational power" of a computational system :Turing completenessTuring equivalence universality...
  • Multi-paradigm programming language
    Multi-paradigm programming language

    A multi-paradigm programming language is a programming language that supports more than one programming paradigm. As Lead designer Tim Budd holds it: The idea of a multiparadigm language is to provide a framework in which programmers can work in a variety of styles, freely intermixing constructs from different paradigms. The design goal...
  • Domain-specific language
  • Programming domain
    Programming domain

    A programming domain defines a specific kind of use for a programming language.Some examples of programming domains are:*Application software...
  • Architecture description language
    Architecture description language

    Different communities use the term architecture description language. Two important communities are:* The software engineering community* The enterprise modelling and engineering community...
  • Modeling language
    Modeling language

    A modeling language is any artificial language that can be used to express information or knowledge or systems in a structure that is defined by a consistent set of rules....


External links