Paradigm originally meant something like 'exemplar'/'pattern'/'template' but in the last 30 years has come to mean something more like 'zeitgeist'/'worldview'. In the former sense, ThereAreExactlyThreeParadigms, this page as about the second sense, but it will be useful to give the defining example of each way of thinking. In no particular order A programming paradigm provides for the programmer the means and structure for the execution of a program. Programmers can think of programs * In ObjectOrientedProgramming ** as a collection of interacting objects * In FunctionalProgramming ** as a sequence of stateless function evaluations Many programming paradigms are as well-known for what they do not do as for what they do. This avoidance of certain techniques can make it easier to prove theorems about a program's correctness and to simply understand its behavior, without limiting it. * PureFunctionalProgramming ** disallows the use of side-effects * Structured programming ** disallows the use of goto. Programming languages advocate different paradigms * Languages designed ** to support object-oriented programming ***SmalltalkLanguage *** JavaLanguage ** to support functional programming *** HaskellLanguage *** SchemeLanguage *Other programming languages designed ** to support multiple paradigms *** CommonLisp, *** PythonLanguage *** OzLanguage *** RubyLanguage ** to support SeparationOfConcerns - AspectOrientedProgramming *** AspectJay *** IoLanguage * CollectionOrientedProgramming ** programming using operations on entire collections, avoiding loops ** languages supporting this paradigm are intrinsically suitable to both sequential and parallel/distributed execution *** SetlLanguage *** AplLanguage *** JayLanguage *** KayLanguage *** Other query based languages * AccessOrientedProgramming ** using records with handlers attached to each variable/slot * ConcatenativeProgramming ** Based on a composition of functions to a single argument (usually a 2D stack) *** ForthLanguage *** MufLanguage *** PostScript *** JayLanguage *** JoyLanguage * ConceptOrientedProgramming ** Based on a concept as the main programming construct *** which is a pair, dual continuation methods **** one object class **** one reference class (see ConceptInCop). *** It's life cycle is controlled by two pairs of dual creation/deletion methods *** Two types of methods distinguished in any system: **** paradigm which also includes ConceptOrientedModel. *** More information can be found on the concept-oriented portal **** http://conceptoriented.org * ConstraintProgramming and ConstraintLogicProgramming ** based on LogicProgramming with constraints *** OzLanguage * DataflowProgramming ** based on FlowBasedProgramming *** PrographLanguage *** GeeLanguage * DeclarativeProgramming ** based on writing computer programs by specifying what the programs should do, and not how they should do it ** declarative programs are ExecutableSpecification'''s ** Emphasizes programming without explicit state *** SingleAssignmentLanguage'''s *** FunctionalProgramming *** LogicProgramming *** ConstraintProgramming *** MercuryLanguage *** PrologLanguage * DesignByContract* (EiffelLanguage) * still OO. * EventDrivenProgramming ** Does 2iota (http://catseye.mine.nu:8080/) count? **** TclTk * EquationalProgramming (KjuLanguage (Q - Is kju the correct WikiWord?)) ** Extension of functional programming. * FormalLanguage'''s ? * FunctionalProgramming ** 'Functional programming is a style of programming that emphasizes the evaluation of expressions, rather than execution of commands. The expressions in these language are formed by using functions to combine basic values. A functional language is a language that supports and encourages programming in a functional style.' (from the FP FAQ) ** see CategoryFunctionalProgramming *** HaskellLanguage *** MlLanguage * GenerativeProgramming ** Most commonly the idea that there are multiple views of a single piece of code ** that it is best to separate these out (potentially in languages/paradigms) ** and let the compiler worry about putting these together. ** The separate pieces are meant to capture your intent more succinctly. *** AspectOrientedProgramming *** IntentionalProgramming *** HyperSpace. * GeneticProgramming - EvolutionaryProgramming ** using generic optimization methods (usually GeneticAlgorithm'''s , ** also SimulatedAnnealing and the like to generate programs which evolve to match a specification ** or complete a task. ** Akin to DeclarativeProgramming in that you try to specify the 'what' but not the 'how'. * LogicProgramming - DeclarativeProgramming ** using logic, specifically the PredicateCalculus. *** PrologLanguage *** MercuryLanguage) * MessagePassingConcurrency - CommunicatingSequentialProcesses ** Concurrency expressed by passing messages between processes or active objects *** OccamLanguage *** ErlangLanguage *** ActorLanguages) * FlowBasedProgramming ** a type of MessagePassingConcurrency ** the primary application development tool is not a language as such, but basically a list of connections defining a network of communicating components. * TermRewriteSystem''''''s ** powerful for modeling and theorem proving. "Variables" describe whole domains rather than individual elements. Rules are often bi-directional, allowing expansions before reductions. A program is an functional application that gets reduced to canonical form. Falls somewhere between LogicProgramming and FunctionalProgramming. *** MaudeLanguage *** ObjLanguage ---- ModularProgramming * ObjectBasedProgramming and ComponentBasedProgramming ** Distinguished from OO typically by a lack of inheritance for the 'components', but still a version of OO. *** Early versions of VisualBasic * ObjectOrientedProgramming ** Characterized by encapsulation, inheritance, and polymorphism, though see ObjectOrientedProgramming for a fuller discussion. *** SmalltalkLanguage *** CommonLispObjectSystem *** SimulaLanguage * ProceduralProgramming ** Characterized by having procedures, functions, and ADTs ** usually no inheritance, encapsulation, or polymorphism *** PascalLanguage *** AlgolLanguage *** ModulaTwo) * PrototypeBasedProgramming ** A version of OO but characterized by cloning objects to obtain instances which can then be customized *** SelfLanguage *** IoLanguage *** JavaScript * ReflectiveProgramming ** See http://www.tunes.org/ * RelationalLanguage ** Programming based on the RelationalAlgebra / RelationalModel. See also TableOrientedProgramming *** StructuredQueryLanguage *** BusinessSystemTwelve *** TutorialDee * StringProgramming - ScriptingLanguage ** EverythingIsa string: text constants are the universal media both for the program and all the data. ** Easy handling for external programs (a feature which came from job control languages). ** Rich string/text processing features ** including RegularExpression'''s etc - Obviously this is obligatory when everything is a string ** Eval feature, that is, the possibility to form a string and apply the language interpreter to it as a code ** See DynamicStringsVsFunctional for examples *** PerlLanguage *** ToolCommandLanguage *** AwkLanguage *** RexxLanguage (maybe?) * SetOrientedProgramming ** related to ConstraintLogicProgramming and CollectionOrientedProgramming. *** SetlLanguage * StructuredProgramming ** see also FunctionalDecomposition * SymbolicProgramming * A paradigm? ** Well these can imitate most of the others (look at the StructureAndInterpretationOfComputerPrograms for examples of scheme doing OO, logic programming, and FunctionalProgramming) ** perhaps these should not be listed separately from the 'pure' FunctionalLanguage'''s ** they are an important class of languages ** Treat code as data and vice-versa. *** LispLanguage *** SchemeLanguage *** PrologLanguage *** SmalltalkLanguage) * TableDrivenProgramming ** classic example is the parsers constructed by YetAnotherCompilerCompiler. ** most implementations of large FiniteStateMachine'''s are built this way. *** (no example languages) * TableOrientedProgramming - CollectionOrientedProgramming ** based on the RelationalModel ---- * It's worth noting that a number of the styles above are ** based more or less directly on mathematical models *** LambdaCalculus *** PredicateCalculus *** RelationalCalculus *** CommunicatingSequentialProcesses ** While Other languages 'just happened' ---- New paradigms are often not well received by those accustomed to earlier styles. ---- A programming language can support multiple paradigms. CeePlusPlus is designed to support elements of procedural programming, object-based programming, object-oriented programming, functional programming, and generic programming. Designers and programmers can decide how to build a program using any or a mix of these paradigm elements. Thus a programmer can write a program in C++ that * is a purely procedural program * is a purely object-oriented program * contains elements of both paradigms * contains elements of functional programming * uses methods of generic programming ---- Related * InformalHistoryOfProgrammingIdeas, GroundBreakingLanguages, MultiParadigmProgramming, MultiParadigmProgrammingLanguage, MixingParadigms, ParadigmsOfArtificialIntelligenceProgramming, WhenToUseWhatParadigm, WhatIsaParadigm ---- AugustZeroSix CategoryProgrammingLanguageComparisons CategoryRoadMap, CategoryMultiparadigm