2. 1 The early history : the first programmer 2 The 1950s: The first programming languages



Download 50.09 Kb.
Date28.01.2017
Size50.09 Kb.
#9074



Chapter 2 /3 History

and Language Design Principles



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


  • Overview

  • by John Backus at IBM

  • scientific and computational programming

  • new features : array, loop, if,

  • new versions

FORTRAN66, FORTRAN77, FORTRAN90, HPF

  • Efficiency of execution

  • efficient code generation

  • important design goal of FORTRAN

Algol60(ALGOrithmic Language)


  • Overview

  • 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

  • new concepts

free-format, structured statements, begin-end blocks,

type declarations for variables

recursion, call-by-value parameters


  • Writability

  • the quality to express a computation clearly, correctly, concisely, and quickly

  • Example

Algol 60 : block structure, and recursion

COBOL(Common Business-Oriented Language)

  • Overview

  • 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


  • Readability

  • the quality to understand the nature of a computation easily and accurately

  • Example

COBOL : by ordinary English
LISP (LISt Processor)

  • Overview

  • designed at MIT by John McCarthy

  • function languages for AI applications

general list structures and function applications

  • Expressiveness

  • 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

  • Overview

  • 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

  • Overview

  • improve Algol60 by

  • creating a more expressive (generality)

- completely consistent structure(orthogonality)
The generality principle


  • The generality principle

  • Avoid special cases in the availability or use of constructs




Regular rules, without exceptions, are easier to learn, use, describe and implement

  • Examples of violation

  • equality operator “=”

  • can be applied only to scalars, pointers, and sets

(but not to array and records) in Pascal

  • no restriction in Ada

- Variable length array

- no variable-length arrays in Pascal

- variable-length arrays in C and Ada



  • Disadvantages

1) reduces the simplicity of a language

2) make the language less readable and reliable



Orthogonality Principle


  • Orthogonality

  • Language constructs should not behave differently in different contexts.

  • Thus restrictions that are context dependent are nonorthogonalities.




  • Example of violation

- 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

  • Overview

  • designed for simulation

  • an object-oriented language

  • class concepts

  • Complexity control

  • background

  • the growing complexity of programming and languages

  • abstraction mechanism

  • control the complexity of a programming task

  • Example

Simula67: class for abstraction

BASIC




2.4 The 1970s: Simplicity, Abstraction, Study




Pascal and C language


  • Overview of Pascal

  • Designed by N. Wirth

  • Simplified version of Algol-68

- small, simple, efficient structured language

  • Overview of C 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

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




  • Over simplified examples

  • 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.




  • Violation of consistency

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


  • Overview

- Developed at U.S. DoD by a team leaded by J. Ichbiah

  • Abstract data type

  • Package

  • Concurrent programming

  • Task

  • Exception handling

  • Question

Is Ada another PL/I ?

C++

  • Overview

  • 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

  • Examples

Simula67 : Class

C++ : Class



Ada : Package
New directions


  • functional languages




  • logic languages

  • 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), ...



Download 50.09 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page