Programming Languages
What is the programming language?
Definition: A programming language enables description and solution of practical problems by providing a means to define the input, behavior and output of a program
Syntax 语法
Definition: are the symbols and rules that are used to describe the input/output (e.g. variables) of the program as well as its behavior.
Key words:
- form or structure
- symbol and rules
Semantics 语义
Definition:is the meaning of the symbols.
Key words:
- Meaning
小总结:
语法和语义构成了计算机语言。
语法是一种形式或者是结构,表示程序的符号及其规则就是语法,这些符号的意思就是语义。
同样的 Semantics 使用不同的 Computer Language 会有不同的表示方式,例如输出 “Hello World!”
c:
printf("Hello World!\n");
c++:
cout<<"Hello World!"<<endl>;
java:
System.out.println("Hello World!");
简言之:
- Syntax is the form or structure
- Semantics is the meaning
Programming paradigms/models 程序范式/模型
Definition:Is a style of programming, i.e. how to write and develop programs.