已发布 / Published 2017-03-27T06:46:20+08:00

千天计划之第964天——语言

编程语言只是一些逻辑符号的组合,特点各异


上课。



什么是编程语言?

维基百科上是这样定义的:


A programming language is a formal computer language designed to communicate instructions to a machine, particularly a computer. Programming languages can be used to create programs to control the behavior of a machine or to express algorithms.


那有多少种编程语言?


图片


N种。


这取决于你如何定义,其实编程语言只是一些逻辑符号的组合,特点各异,一般而言,业余者掌握一两种去使用就不错了, 精通者则会研究下lunix/windows/xp/ios/mac系统,大师级则会掌握这背后的一套逻辑吧。


维基百科上列了256种。


乍一看真的有很多:

图片

图片


.........


图片


从A到Z这每一个字母中都有包含几种编程语言,而且科技还是不断发展进步的,一种新的语言随时可能被创造出来,但是它肯定还是会依托于最古老的语言基础上并不断优化、改造。


但其实这些不全,500+,1000+都有可能,看你怎么分类了,出于不同目的,我们随时可能创造出来。


但是经典之物永不退色。


最常用的是这些:


图片


图片


在术语上可以分为以下三类:



down vote

Machine language: Machine language is a low-level programming language. It is easily understood by computers but difficult to read by people. This is why people use higher level programming languages. Programs written in high-level languages are also either compiled and/or interpreted into machine language so that computers can execute them.

Assembly language: Assembly language is a representation of machine language. In other words, each assembly language instruction translates to a machine language instruction. Though assembly language statements are readable, the statements are still low-level. A disadvantage of assembly language is that it is not portable, because each platform comes with a particular Assembly Language.

High-level language: High-level languages are what most programmers use nowadays. Languages such as C, C++ and Java are all high-level languages. Advantages of high-level languages are that they are very readable and portable. A disadvantage of high-level languages is that they are less powerful than Assembly Languages. Because a single statement in a high-level language is translated into many machine language statements.


比较难的、水平较高的是:


  1. Functional languages: In Functional language, a program is divided into function definitions. Functional languages are a kind of declarative language. They are mostly based on the typed lambda-calculus with constants. Some of the famous Function languages are Scala, F#, Clojure and Lisp.

  2. Procedural languages: In Procedural Languages, a program is written in a sequences of steps that should be followed to produce a result. COBOL, FORTRAN and C are some Procedural languages.

  3. Object Oriented Programming languages: In OOP languages, a program is divided into Object that contain data as well as methods that operate on the data. Java, C# and C++ are OOP languages.

  4. Logic Programming languages: Logic Languages are used to create programs that enables the computer to reason logically. eg: Logic language



也有一种分类方法是Programming paradigms。


Programming paradigms are a way to classify programming languages according to the style of computer programming.


常见的是:

  • imperative which allows side effects,

  • functional which disallows side effects,

  • declarative which does not state the order in which operations execute,

  • object-oriented which groups code together with the state the code modifies,

  • procedural which groups code into functions,

  • logic which has a particular style of execution model coupled to a particular style of syntax and grammar, and

  • symbolic programming which has a particular style of syntax and grammar.



最经典在最常用最普遍的还是java和c系列以及python等,好了,有个大概认识,找资源学吧。


下课。