博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
编程思想-编程范式
阅读量:6236 次
发布时间:2019-06-22

本文共 5336 字,大约阅读时间需要 17 分钟。

Different approaches to programming have developed over time, being identified as such either at the time or retrospectively. An early approach consciously identified as such is , advocated since the mid 1960s. The concept of a "programming paradigm" as such dates at least to 1978, in the  lecture of , entitled The Paradigms of Programming, which cites the notion of paradigm as used by  in his  (1962).

Machine code[]

The  programming paradigms are , which directly represents the  (the contents of program memory) as a sequence of numbers, and  where the machine instructions are represented by mnemonics and  can be given symbolic labels. These are sometimes called  and  languages.

In the 1960s, assembly languages were developed to support library COPY and quite sophisticated conditional macro generation and preprocessing abilities, CALL to (), external variables and common sections (globals), enabling significant code re-use and isolation from hardware specifics via use of logical operators such as READ/WRITE/GET/PUT. Assembly was, and still is, used for time critical systems and often in  as it gives the most direct control of what the machine does.

Procedural languages[]

The next advance was the development of . These  languages (the first described as ) use vocabulary related to the problem being solved. For example,

  • COmmon Business Oriented Language () – uses terms like ,  and .
  • FORmula TRANslation () – using  language terminology, it was developed mainly for scientific and engineering problems.
  • ALGOrithmic Language () – focused on being an appropriate language to define , while using mathematical language terminology and targeting scientific and engineering problems just like FORTRAN.
  • Programming Language One () – a hybrid commercial-scientific general purpose language supporting .
  • Beginners All purpose Symbolic Instruction Code () – it was developed to enable more people to write programs.
  •  – a general-purpose programming language, initially developed by  between 1969 and 1973 at .

All these languages follow the procedural paradigm. That is, they describe, step by step, exactly the procedure that should, according to the particular programmer at least, be followed to solve a specific problem. The  and  of any such solution are both therefore entirely subjective and highly dependent on that programmer's experience, inventiveness, and ability.

Object-oriented programming[]

Following the widespread use of procedural languages,  (OOP) languages were created, such as , , , , , , and . In these languages,  and methods to manipulate it are kept as one unit called an . The only way that another object or user can access the data is via the object's . Thus, the inner workings of an object may be changed without affecting any code that uses the object. There is still some  raised by ,  and other programmers, concerning the efficacy of the OOP paradigm versus the procedural paradigm. The need for every object to have associative methods leads some skeptics to associate OOP with ; an attempt to resolve this dilemma came through .

Because object-oriented programming is considered a paradigm, not a language, it is possible to create even an object-oriented assembler language.  (HLA) is an example of this that fully supports advanced data types and object-oriented assembly language programming – despite its early origins. Thus, differing programming paradigms can be seen rather like motivational  of their advocates, rather than necessarily representing progress from one level to the next. Precise comparisons of the efficacy of competing paradigms are frequently made more difficult because of new and differing terminology applied to similar entities and processes together with numerous implementation distinctions across languages.

Further paradigms[]

, as a form of , structures programs as a human-centered web, as in a  essay: documentation is integral to the program, and the program is structured following the logic of prose exposition, rather than compiler convenience.

Independent of the imperative branch,  paradigms were developed. In these languages, the computer is told what the problem is, not how to solve the problem – the program is structured as a set of properties to find in the expected result, not as a procedure to follow. Given a database or a set of rules, the computer tries to find a solution matching all the desired properties. An archetype of a declarative language is the  , and the family of functional languages and logic programming.

 is a subset of declarative programming. Programs written using this paradigm use , blocks of code intended to behave like . Functional languages discourage changes in the value of variables through , making a great deal of use of  instead.

The  paradigm views computation as  over a body of knowledge. Facts about the  are expressed as logic formulae, and programs are executed by applying  over them until an answer to the problem is found, or the set of formulae is proved inconsistent.

 is a paradigm that describes programs able to manipulate formulas and program components as data. Programs can thus effectively modify themselves, and appear to "learn", making them suited for applications such as , ,  and computer games. Languages that support this paradigm include  and .

 

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

转载地址:http://mczia.baihongyu.com/

你可能感兴趣的文章
java的ArrayList使用方法
查看>>
十招让Ubuntu 16.04用起来更得心应手
查看>>
awk笔记1
查看>>
Maven for Eclipse 第三章 ——创建和导入 Maven 项目
查看>>
js jquery中 的数据类型
查看>>
DenyHosts安装及配置
查看>>
表单多文件上传样式美化 && 支持选中文件后删除相关项
查看>>
利用Axis2默认口令安全漏洞可入侵WebService网站
查看>>
java-----基本数据类型包装类
查看>>
MD5 SHA-1 示例
查看>>
【WPF】退出应用时的提示弹窗
查看>>
Node.js - 断言
查看>>
缓存穿透,缓存雪崩,热点key及解决办法
查看>>
Nginx配置直接php
查看>>
android样式开发
查看>>
radio选择事件 onchange事件 onclick事件
查看>>
很清晰的解读i2c协议【转】
查看>>
荆慕瑶
查看>>
密码需要带特殊字符(二)
查看>>
10 advanced LotusScript tips
查看>>