02 History
02 History
Programming
Languages
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 1
History
• Early History : The first programmers
• 1940s: Von Neumann and Zuse
• 1950s: The First Programming Language
• 1960s: Explosion in Programming languages
• 1970s: Simplicity, Abstraction, Study
• 1980s: Object-oriented, Logic programming
• 1990s: Internet, Java, C++, C#
• 2000s: Scripting, Web, …
• 2010s: Parallel computing, concurency
A(7) := 5 * B(6)
| 5 * B => A
V | 6 7 (subscripts)
S | 1.n 1.n (data types)
PROGRAM SQUARE
DO 15,I = 1,10
WRITE(*, *) I*I
15 CONTINUE
END
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 13
Fortran 0 and 1
FORTRAN 0 – 1954 (not implemented)
FORTRAN I - 1957
Designed for the new IBM 704, which had index
registers and floating point hardware
Environment of development:
Computers were small and unreliable
Applications were scientific
No programming methodology or tools
Machine efficiency was most important
Impact of environment on design
• No need for dynamic storage
• Need good array handling and counting loops
• No string handling, decimal arithmetic, or
powerful input/output (commercial stuff)
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 14
Fortran I Features
• Names could have up to six characters
• Post-test counting loop (DO I=1, 100)
• Formatted I/O
• User-defined subprograms
• Three-way selection statement (arithmetic IF with GOTO)
IF (ICOUNT-1) 100 200 300
• Implicit data typing statements
variables beginning with i, j, k, l, m or n were integers,
all else floating point
• No separate compilation
• Programs larger than 400 lines rarely compiled correctly,
mainly due to poor reliability of the 704
• Code was very fast
• Quickly became widely used
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 15
Fortran II, IV and 77
FORTRAN II - 1958
• Independent compilation
• Fix the bugs
FORTRAN IV - 1960-62
• Explicit type declarations
• Logical selection statement
• Subprogram names could be parameters
• ANSI standard in 1966
FORTRAN 77 - 1978
• Character string handling
• Logical loop control statement
• IF-THEN-ELSE statement
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 16
Fortran 90 (1990)
Added many features of more modern
programming languages, including
• Pointers
• Recursion
• CASE statement
• Parameter type checking
• A collection of array operations, DOTPRODUCT,
MATMUL, TRANSPOSE, etc
• dynamic allocations and deallocation of arrays
• a form of records (called derived types)
• Module facility (similar Ada’s package)
DATA DIVISION.
FILE SECTION.
WORKING-STORAGE SECTION.
LINKAGE SECTION.
PROCEDURE DIVISION.
DISPLAY "Hello World".
STOP RUN.
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 22
BASIC (1964)
• Beginner's All purpose Symbolic Instruction Code
• Designed by Kemeny & Kurtz at Dartmouth for the GE
225 with the goals:
• Easy to learn and use for non-science students and as
a path to Fortran and Algol
• Must be “pleasant and friendly”
• Fast turnaround for homework
• Free and private access
• User time is more important than computer time
• Well suited for implementation on first PCs (e.g., Gates
and Allen’s 4K Basic interpreter for the MITS Altair
personal computer (circa 1975)
• Current popular dialects: Visual BASIC
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 23
BASIC Examples
FOR I=1 TO 10
PRINT I*I;
NEXT I
Comments:
• Many new features were poorly designed
• Too large and too complex
• Was (and still is) actually used for both scientific
and business applications
• Subsets (e.g. PL/C) developed which were more
manageable
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 36
Simula (1962-67)
• Designed and built by Ole-Johan Dahl and Kristen
Nygaard at the Norwegian Computing Centre
(NCC) in Oslo between 1962 and 1967
• Originally designed and implemented for discrete
event simulation
• Based on ALGOL 60
Primary Contributions:
• Coroutines - a kind of subprogram
• Classes (data plus methods) and objects
• Inheritance
• Dynamic binding
=> Introduced the basic ideas that developed into
object-oriented programming.
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 37
Algol 68
From the continued development of ALGOL 60, but it is not
a superset of that language
• Design is based on the concept of orthogonality
• Contributions:
• User-defined data structures
• Reference types
• Dynamic arrays (called flex arrays)
• Comments:
• Had even less usage than ALGOL 60
• Had strong influence on subsequent languages,
especially Pascal, C, and Ada
CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 38
The 1970s: Simplicity,
Abstraction, Study
• Algol-W - Nicklaus Wirth and C.A.R.Hoare
– reaction against 1960s
– simplicity
• Pascal
– small, simple, efficient structures
– for teaching program
• C - 1972 - Dennis Ritchie
– aims for simplicity by reducing restrictions of the type system
– allows access to underlying system
– interface with O/S - UNIX