Lecture 06
Lecture 06
Lecture 06
• Never implemented
• Had advanced data types and structures
• Floating point, arrays, records, nesting in records
• No explicit goto statements
• Iteration
• Selection without else part
• Invariants and assertions
• Problems Zuse Solved
• Sorting
• Graph connectivity
• Integer and floating point arithmetic
• Expressions with operator precedence
• Chess playing
• Terse Notation
Assemblers and Assembly Language
• Fortran IV
• Explicit type declarations
• Logical IF statement
• Passing subprogram as parameters
• ANSI standard in 1966
Fortran I (continued)
• FORTRAN 77 – 1977
• Structured Programming
• Character string handling
• Logical loop control statement
• IF-THEN-ELSE statement
• FORTRAN 90 – 1990
• Modules
• Dynamic arrays
• Pointers
• Recursion
• CASE statement
• Parameter type checking
Functional Programming
LISP – McCarthy 1959
• LISt Processing language
• AI research lab at MIT
• Linguistic, psychology, and mathematics
• Needed a language that:
• Process data in dynamically growing lists (rather than arrays)
• Symbolic computation (rather than numeric)
• Only two data types: atoms and lists
• Syntax is based on lambda calculus
• Pioneered functional programming
• No need for assignment
• Control via recursion and conditional expressions
• It is still the dominant language for AI
• COMMON LISP and Scheme are contemporary dialects of
LISP
• ML, Miranda, and Haskell are related languages
ALGOL
ALGOL 58 – 1958
• ALGOrithmic Language
• Search for a “Universal Language”
• Environment of development:
• FORTRAN had (barely) arrived for IBM 70x and was owned by IBM
• Many other languages were being developed, all for specific
machines
• No portable language; all were machine-dependent
• No universal language for communicating algorithms
• Never implemented
• IBM was initially enthusiastic but vested interest in
FORTRAN resulted in taking back all support by mid-1959
Algol 60 - 1960
• New Features:
• Block structure (local scope)
• Two parameter passing methods – value and name
• Subprogram recursion
• Stack-dynamic arrays – run time size definition and space
allocation
• No I/O
• Syntax was defined in BNF
Algol 60 (Continued)
• Successes:
• It was the standard way to publish algorithms for over 20 years
• All subsequent imperative languages are based on it
• First machine-independent language
• First language whose syntax was formally defined in BNF
• Had impact on hardware design
• Failure:
• Never widely used, especially in U.S.
• Reasons:
• No I/O and the character set made programs non-portable
• Too flexible, so hard to understand and implement
• IBM’s interest in FORTRAN
• Formal syntax description – at that time BNF was considered
strange and complicated!
Algol 68 - 1968