## 问题 Problems

• 什么是编程语言？有哪些？各自是什么类型？
What is programming language? How many programming language we have? How many types?
• 语言的基本组成要素是什么？
What’s the core foundations of programming language？
• 为什么有那么多的编程语言?
Why there are so many programming language?
• 语言之间的相同点和异同点是什么？What are the similarities and differences among those languages?
• 为什么有时候创造一门新语言能更好的解决问题？
Why sometimes creating a new language is a better way to solve problems?
• 如何实现一门编程语言？
How to implement a programming language
• 我学过哪些编程语言?
How many programming languages I have learned?

    - C
- C++
- 汇编
- Java
- C#
- HTML/CSS
- JavaScript
- Swift
- Cobol、JCL
- PHP
- Objective-C


## 什么是编程语言？What is programming language?

One of the main function of human language is to communicate, so does the computer programming language. But it’s a communication between the computers and human beings. The computer is quite “stupid” since it only does the instructions which have been told. Those instructions, written by human beings, are programming languages.

## 语言类型 What’s the type of programming languages?

You may have heard different standard of classification.For example, we can divide them from the language level: low level, medium level and high level. We can see from the language Implementation: Interpreted、Compiled、Hybrid Language Implementations. Or we can divide from the style: Imperative/Object-Oriented Programming, Functional Programming, Logic Programming.

How to distinguish between compiled language and interpreted language? A program must be translate to the form which the computer can execute. The complier does the translation from the source language to target language. While the Interpreter directly execute the operations in the source program.

wiki分类2

## 语言的基本组成要素是什么？What’s the core foundations of programming language？

The following thinking is based on my own limit experience with programming language, so please feel free to offer your own opinions and discuss with me.

Syntax of a programming language determines the well-formed or grammatically correct programs of the language. Semantics describes how or whether such programs will execute.

• Syntax is how things look
• Semantics is how things work (the meaning)

### 过程 process

• 表达式 expression
• 语句 statement
• 声明 declare 常量与变量
• 赋值
• 判断 judge
• if-else
• switch-case
• 循环 loop
• while / do while
• for
• if
• 操作operation
• / %
•  :? && ! » «
• 数据类型 data type (the value and the operation)
• 原始类型 primitive type
• 数值型 numberic: short,int,float,double,long
• 字符 string:char,string
• 空 nil
• enumeration
• dictionary
• array
• struct
• generic
• 函数 function
• type-return
• name

### 面向对象 object-oriented

• 类 class
• attribute
• function(method)
• construct-deconstruct
• 继承 inherit
• 单继承、多继承
• 多态
• 重载
• 接口 interface
• 协议 delegate

SCIP:

• 过程抽象
• 数据抽象

## Reference:

1. 从本质上来看，计算机能做的事情就是计算，不是吗？Actually, the computer can do nothing but computation, isn’t it?