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. 「CorelDRAW降价提醒」,您关注的商品已降价!

    不管是“光棍节”还是“剁手节” 似乎和我都没有什么关系 事实证明,我错了 今天,早上竟然有不识趣的人发红包祝我单身快乐 纳尼,有没有搞错? 我能直接怼回去,说不领么? 但好像又不是我的风格 哎,一个红 ...

  2. hust 1570 Lazy. Lazy. Laaaaaaaaaaaazy!

    链接 1570 - Lazy. Lazy. Laaaaaaaaaaaazy! 题意 给出三种按键,caplock,shift,nomal(像正常键盘操作一样) ,输入三串字符串,s1,s2,txt, ...

  3. nginx强制使用https访问(多站点多域名配置)

    很多配置过https模板的人都知道,配置https 时 ,站在用户的角度http 和https 的区别根本不清楚.有时候敲 http 时会出现 404 错误,而实际上我们是https. 有朋友找我配置 ...

  4. ftp服务器在linux中安装

    1.安装 执行 yum -y install vsftpd 2.检验是否安装vsftpd : rmp -qa | grep vsftpd      默认配置文件/ect/vsftpd/vsftpd.c ...

  5. 判断n是否为质数

    #include <iostream> #include <vector> #include <stdio.h> using namespace std; int ...

  6. struct 模块解决 TCP黏包问题

    首先来看一下产生黏包现象的一段代码: # server.py 服务端 import socket ​ sk = socket.socket() sk.bind(('127.0.0.1',9000)) ...

  7. [置顶] QQ空间技术架构之深刻揭密

    QQ空间作为腾讯海量互联网服务产品,经过近七年的发展,实现了从十万级到亿级同时在线的飞跃.在这个过程中,QQ空间团队遇到了哪些技术挑战?其站点前后台架构随着业务规模的变化又进行了怎样的演进与变迁?成长 ...

  8. spring 整合freemarker 实现模板继承

    <!--freemarker 配置--> <bean id="freemarkerConfig" class="org.springframework. ...

  9. 使用Eclipse进行远程调控

    什么是远程调试,就是在A机器上利用Eclipse单步跟踪调试B机器上的Web应用,当然调试A机器上Web应用也是没有问题的,90%我都是调试本机的Web应用,远程调试的意义我想我不用说了,大家都会想到 ...

  10. NHibernate之旅(14):探索NHibernate中使用视图

    本节内容 引入 1.持久化类 2.映射文件 3.測试 结语 引入 在数据库操作中,我们除了对表操作,还有视图.存储过程等操作,这一篇和下篇来学习这些内容.这篇我们来学习怎样在NHibernate中使用 ...