Main paradigm approaches[edit]

The following are widely considered the main programming paradigms, as seen when measuring programming language popularity. There is some overlap between paradigms, inevitably, but the main features or identifiable differences are summarized in this table:

None of the main programming paradigms have a precise, globally unanimous definition, nor official international standard. Nor is there any agreement on which paradigm constitutes the best method to developing software. The subroutines that implement OOP methods may be ultimately coded in an imperative, functional, or procedural style that may, or may not, directly alter state on behalf of the invoking program.

Paradigm Description Main traits Related paradigm(s) Critique Examples
Imperative Programs as statements that directly change computed state (datafields) Direct assignments, common data structuresglobal variables   Edsger W. DijkstraMichael A. Jackson CC++JavaPHPPythonRuby
Structured A style of imperative programming with more logical program structure Structogramsindentation, no or limited use of goto statements Imperative   CC++JavaPython
Procedural Derived from structured programming, based on the concept of modular programming or the procedure call Local variables, sequence, selection, iteration, and modularization Structured, imperative   CC++LispPHPPython
Functional Treats computation as the evaluation of mathematical functions avoiding state and mutable data Lambda calculuscompositionalityformularecursionreferential transparency, no side effects Declarative   C++,[1] ClojureCoffeescript,[2] ElixirErlangF#HaskellLispPythonRubyScalaSequenceLStandard MLJavaScript
Event-drivenincluding time-driven Control flow is determined mainly by events, such as mouse clicks or interrupts including timer Main loop, event handlers, asynchronous processes Procedural, dataflow   JavaScriptActionScriptVisual BasicElm
Object-oriented Treats datafields as objects manipulated through predefined methods only Objects, methods, message passinginformation hidingdata abstractionencapsulationpolymorphisminheritanceserialization-marshalling Procedural Here and[3][4][5] Common LispC++C#EiffelJavaPHPPythonRubyScalaJavaScript[6][7]
Declarative Defines program logic, but not detailed control flow Fourth-generation languagesspreadsheetsreport program generators     SQLregular expressionsCSSPrologOWLSPARQL
Automata-based programming Treats programs as a model of a finite state machine or any other formal automata State enumerationcontrol variablestate changes, isomorphismstate transition table Imperative, event-driven   Abstract State Machine Language

Differences in terminology

https://en.wikipedia.org/wiki/Comparison_of_programming_paradigms

Comparison of programming paradigms的更多相关文章

  1. FRP represents an intersection of two programming paradigms.

    FRP represents an intersection of two programming paradigms. Functional programming Functional progr ...

  2. Programming paradigms

    https://en.wikipedia.org/wiki/Aspect-oriented_programming Action Agent-oriented Array-oriented Autom ...

  3. Comparison of programming languages

    The following table compares general and technical information for a selection of commonly used prog ...

  4. (转)The Road to TensorFlow

    Stephen Smith's Blog All things Sage 300… The Road to TensorFlow – Part 7: Finally Some Code leave a ...

  5. (转)Awesome Courses

    Awesome Courses  Introduction There is a lot of hidden treasure lying within university pages scatte ...

  6. C++ Knowledge series 1

    Programming language evolves always along with Compiler's evolvement. 1. The C++ Object Model: Strou ...

  7. Lua的各种资源2

    Lua Directory     This page is a top level directory of all Lua content at this wiki, grouped by top ...

  8. RXJava by Example--转

    原文地址:https://www.infoq.com/articles/rxjava-by-example Key takeaways Reactive programming is a specif ...

  9. 为什么要在游戏开发中使用ECS模式

    http://www.richardlord.net/blog/why-use-an-entity-framework Why use an entity system framework for g ...

随机推荐

  1. 【WebApp】IOS兼容问题

    最近,主要是基于Framework7 + RequireJs框架,移动端团队开发Webview框架,内嵌Web的模式进行WebApp开发. 在开发过程中不得不遇到一些 兼容性问题. 1.现象:IOS环 ...

  2. codeforce 788 A. Funtions again

    链接 A. Functions again 题意 这是一道求最大连续子序列和变形题. 做法 先将abs(a[i+1]-a[i]算出来,然后用两个数组dp[i],cp[i],dp维护其最大值,cp维护其 ...

  3. 阿里云API网关!

    API 网关(API Gateway)提供高性能.高可用的 API 托管服务,帮助用户对外开放其部署在 ECS.容器服务等阿里云产品上的应用,提供完整的 API 发布.管理.维护生命周期管理.用户只需 ...

  4. BZOJ 1367 [Baltic2004]sequence (可并堆)

    题面:BZOJ传送门 题目大意:给你一个序列$a$,让你构造一个递增序列$b$,使得$\sum |a_{i}-b_{i}|$最小,$a_{i},b_{i}$均为整数 神仙题.. 我们先考虑b不递减的情 ...

  5. Mac python3 环境下 完善pdf转jpg脚本

    由于样本图片数据都是保存在pdf里,想拿到样本必须先把图片从pdf中提取出来,算是数据清洗中的一点小小的积累吧. 这里不得不吐槽一下公司存储图片的机制,业务员把jpg格式的照片放到word里,然后用工 ...

  6. base64格式文件下载方法

    下载图片时,接口返回的地址是base64格式的文件数据,因为页面需要把base64格式的数据转换为文件,再进行下载: 解决方案: 下载按钮: <el-button type="defa ...

  7. redis 五大数据类型

    一.String set : 添加数据 get : 获得指定 key 的 value del : 删除指定 key append : 往字符串后面添加       append k1 12345    ...

  8. java 线程安全和不安全

    线程安全就是多线程访问时,采用了加锁机制,当一个线程访问该类的某个数据时,进行保护,其他线程不能进行访问直到该线程读取完,其他线程才可使用.不会出现数据不一致或者数据污染.(Vector,HashTa ...

  9. 【百度语音识别】JavaAPI方式语音识别示例

    https://ai.baidu.com/forum/topic/show/496730

  10. 浅析C++绑定到Lua的方法

    注:原文也在公司内部论坛上发了  概述       尽管将C++对象绑定到Lua已经有tolua++(Cocos2d-x 3.0用的就是这个).LuaBridge(我们游戏client对这个库进行了改 ...