Professional Documents
Culture Documents
PL - 3 Language Design
PL - 3 Language Design
Chapter 3 – PL design
Outline
3.1 historical transition of design standard
3.2 efficiency
3.3 generality, orthogonality, uniformity
3.4 other design principles at PL
3.5 problem and solution
2
In the 1950s
In the early 1950, the efficiency of execution was important
ex) Fortran
In the 1960s
complexity control ‘s necessary
In the 1980s
Insert logical and mathematical concept to language
Include logic to PL
ex) C++
5
Principles of PL design
generality
orthogonality
uniformity
other principles
- simplicity - security
- preciseness - extensibility
Efficiency of translation
Efficiency of implementation
Efficiency of programming
7
Efficiency of translation
Efficiency of implementation
Problem of translator’s efficiency implementation
ex) There is a case of language not to be succeeded because the implementation
of translator is too difficult or execution algorithm is not comprehended. (Algol
60: with stack based structure for real time system)
Efficiency of programming
Simplicity and easy of program compiling
Ideal language : Lisp, Prolog because they are very simple and lots of parts are
executed at the execution time.
uniformity
нэг төрлийн байдал
10
parameter
Fortran : allow only call by reference
Algol 68, C, Java : call by value, call by value by pointer to object generality
Ada : afford generality
constant
Fortran : no constant name
Pascal : no expression to constant
Ada : afford constant with generality
12
Problem of generality
C : except of array
string
Modula-2 : use string (small string bigger string)
parameter
C : array - call by reference, remained all type is call by value
Ada : all data types - call by value, result, value-result (orthogonality)
procedure p ; (* terminator *)
var x : integer ; (* separator *)
y : real ; (* terminator *)
begin
x := 0 ; (* separator *)
y := 1.0
end; (* terminator *)
Non-uniformity can be regarded as a non-orthogonality because non-uniformity is caused
only in the special statement.
17
machine independence
Goal: reduce the programming error and find the error easily
Advantage of restrictability
Compiler maker can use and implement adopting the subset of the
language (support subset of language)
reliability
• afford real implementation and user guide (for beginner and advanced)