2.1 The early history : the first programmer
2.2 The 1950s: The first programming languages
2.3 The 1960s: An explosion in programming languages
2.4 The 1970s: Simplicity, Abstraction, Study
2.5 The 1980’s : Consolidation and new directions
2.6 The current and future
2.1 The early history :
the first programmer
|
-
Early electronic computer
-
Machine language programming
-
Assembly language programming
2.2 The 1950s:
The first programming languages
|
FORTRAN
-
by John Backus at IBM
-
scientific and computational programming
-
new features : array, loop, if,
-
new versions
FORTRAN66, FORTRAN77, FORTRAN90, HPF
-
efficient code generation
-
important design goal of FORTRAN
Algol60(ALGOrithmic Language)
-
developed by Algol committee (1958-1960)
a general, expressive language for describing algorithms
-
a basis for the current imperative languages like
Pascal, C, Modula-2, and Ada
free-format, structured statements, begin-end blocks,
type declarations for variables
recursion, call-by-value parameters
-
the quality to express a computation clearly, correctly, concisely, and quickly
-
Example
Algol 60 : block structure, and recursion
COBOL(Common Business-Oriented Language)
-
by U.S. DoD by a team led by Grace Hopper
-
business-oriented language
-
new features
- record structure
- separation of data structures form the execution section
- versatile formatting for output
-
the quality to understand the nature of a computation easily and accurately
-
Example
COBOL : by ordinary English
LISP (LISt Processor)
-
designed at MIT by John McCarthy
-
function languages for AI applications
general list structures and function applications
-
the ease to express complex processes and structures in programming
-
recursion in LISP
-
Disadvantage : expressiveness can conflict with simplicity
2.3 The 1960s: An explosion in programming languages
|
Dream of more general and universal languages
PL/I
-
PL/I project at IBM
-
combine all the best features of FORTRAN, COBOL, and Algol60
-
concurrency and exception handling
-
Translator
-
difficult to write, slow, huge and unreliable
-
difficult to learn and error prone to use,
-
due to the large number of unpredictable interactions among language features
Algol-68
-
improve Algol60 by
-
creating a more expressive (generality)
- completely consistent structure(orthogonality)
The generality principle
-
Avoid special cases in the availability or use of constructs
-
equality operator “=”
-
can be applied only to scalars, pointers, and sets
(but not to array and records) in Pascal
- Variable length array
- no variable-length arrays in Pascal
- variable-length arrays in C and Ada
1) reduces the simplicity of a language
2) make the language less readable and reliable
Orthogonality Principle
-
Language constructs should not behave differently in different contexts.
-
Thus restrictions that are context dependent are nonorthogonalities.
- Return value of function
-
Pascal functions can return only scalar or pointer type (consider assignment in Pascal)
-
C functions returns values of all data types except array
-
In Ada, this nonorthogonality is removed
-
Pascal file types
-
a special status, for example, files cannot be passed as value, and no assignment to file variable
Simula-67
-
designed for simulation
-
an object-oriented language
-
class concepts
-
background
-
the growing complexity of programming and languages
-
abstraction mechanism
-
control the complexity of a programming task
Simula67: class for abstraction
BASIC
2.4 The 1970s: Simplicity, Abstraction, Study
|
Pascal and C language
-
Designed by N. Wirth
-
Simplified version of Algol-68
- small, simple, efficient structured language
-
Tries simplicity in different ways from Pascal
-
retaining and restricting the expression orientation
-
reduce the complexity of the type and runtime system
-
more access ot the underlying machine
Design Principles of Pascal and C
Simplicity seems like an easy principle to achieve, but it is surprisingly difficult in practice. Generality, uniformity, and orthogonality are not simplicity.
Simplicity Principle by A. Einstein
Everything should be made as simple as possible, but not simpler
|
-
BASIC
-
lacks declarations and blocks
-
makes it much more difficult to program large applications
-
Pascal
-
lacks good string handling, separate compilation, etc.
-
Consistency of language design
Syntactic Consistency Principle
Things which look similar should be similar and things which look different should be different.
|
1) FORTRAN GOTO statement
compute GOTO
GOTO (L1, L2, . . ., Ln), I
assigned GOTO : indirect GOTO
ASSIGN 20 TO N
GOTO N, (L1, L2, . . ., Ln)
misuses
ASSIGN 20 TO N
GOTO (20, 30, 40, 50), N
(unpredictable GOTO)
I = 3
GOTO I, (20, 30, 40, 50)
2) DO 99 I = 1.10 in FORTRAN
3) Pascal
- repeat, while statements
repeat
. . .
until (condition);
while (condition) do
begin
. . .
end;
- return value
function f : boolean;
begin
f := true;
end;
2.5 The 1980’s : Consolidation and new directions
|
Ada
- Developed at U.S. DoD by a team leaded by J. Ichbiah
-
Abstract data type
-
Package
-
Concurrent programming
-
Task
-
Exception handling
Is Ada another PL/I ?
C++
-
Developed by B. Stroustrup
-
Object-oriented extension of C
-
Object, class, inheritance, ...
-
Complexity Control Revisited
-
Background
-
the growing complexity of programming (S/W crisis)
-
Abstraction mechanism
-
control the complexity of a programming task
Simula67 : Class
C++ : Class
Ada : Package
New directions
-
Prolog, Concurrent Prolog, ...
-
Constraint Logic Programming
2.6 The current and future
|
What will programming language be in the year 2000 ?
-
Internet programming environment
-
JAVA
-
a just simplified version of C++ with powerfule libraries
-
compile into Byte code of JVM and interpret
-
executable on Internet environment
-
portable on Browser like Netscape
-
Script languages for Internet programming
-
Perl, Java Script, VRML, …
Languages with clear semantics
-
SML(Standard ML),
-
Constraint Programming
-
CLP(Constraint Logic Programming), ...
Share with your friends: |