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. spring cloud(二) zuul

    spring cloud 网关 zuul 搭建过程 1. 新建boot工程 pom引入依赖 <dependency> <groupId>org.springframework. ...

  2. Django02 Django基础知识

    一.内容回顾 1.web应用程序 2.HTTP协议 a.http协议特性 b.http请求格式 c.http响应格式 3.wsgiref模块 4.Django下载与简单应用 a.Django简介(MT ...

  3. IE 11 浏览器兼容性视图设置

    1.打开IE 浏览器. 2.选择“工具”---“兼容性视图设置”.3.在“在兼容性视图中显示所有网站”前面勾选住. 点击关闭就可以了. 开发人员工具 1.找到“工具”----“F12开发人员工具”.2 ...

  4. hibernate详细配置

    映射配置 <!-- 映射文件: 映射一个实体类对象:  描述一个对象最终实现可以直接保存对象数据到数据库中.  --> <!-- package: 要映射的对象所在的包(可选,如果不 ...

  5. js实现图片上传预览功能,使用base64编码来实现

    <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content ...

  6. CentOS 7 yum 安装redis(更简单)

    一.安装redis 1.检查是否有redis yum 源 1 yum install redis 2.下载fedora的epel仓库 1 yum install epel-release 3.安装re ...

  7. 洛谷P1427 小鱼的数字游戏

    题目描述 小鱼最近被要求参加一个数字游戏,要求它把看到的一串数字(长度不一定,以0结束,最多不超过100个,数字不超过2^32-1),记住了然后反着念出来(表示结束的数字0就不要念出来了).这对小鱼的 ...

  8. Linux操作随笔

    1.查看php加载的模块 /usr/local/php/bin/php -m |less 2.查询连接数 netstat -ntu | awk '{print $5}' | cut -d: -f1 | ...

  9. 修改linux新建账户时的过期时间

    #!/bin/bash cat << EOF >> /etc/login.defs PASS_MAX_DAYS 90 EOF

  10. 【codeforces 723F】st-Spanning Tree

    [题目链接]:http://codeforces.com/contest/723/problem/F [题意] 给你一张图; 让你选择n-1条边; 使得这张图成为一颗树(生成树); 同时s的度数不超过 ...