Docsity

A Historical Overview of Programming Languages: From Plankalkül to Java, Study notes of Object Oriented Programming

Toggle sidebar
bg1
History of Programming
Languages
•Plankalkül – 1945
- Never implemented
- Develped by Zuse (German Scientist)
- Plankalkül means program calculus
- Simplest data type (single bit)
- Includes arrays and records
•Pseudocodes – 1949
The computers were slow, unreliable, expensive and
having small memories. No high level or assembly lang.
What was wrong with using machine code?
a. Poor readability
b. Poor modifiability
c. Expression coding was tedious
d. Machine deficiencies--no indexing or fl. pt.
Short code – 1949 – BINAC computer
- Included the coded versions of math. exp.
- The codes were byte – pair values
Speedcoding; 1954 - IBM 701
- Pseudo ops for arithmetic and math. functions
- Conditional and unconditional branching
- Auto increment registers for array access
- Only 700 words left for user program
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c

Partial preview of the text

Download A Historical Overview of Programming Languages: From Plankalkül to Java and more Study notes Object Oriented Programming in PDF only on Docsity!

History of Programming

Languages•^ Plankalkül – 1945

Never implemented Develped by Zuse (German Scientist) Plankalkül means program calculus Simplest data type (single bit) Includes arrays and records

• Pseudocodes – 1949

The computers were slow, unreliable, expensive and having small memories. No high level or assembly lang. What was wrong with using machine code? a. Poor readability b. Poor modifiability c. Expression coding was tedious d. Machine deficienciesno indexing or fl. pt. Short code – 1949 – BINAC computer Included the coded versions of math. exp. The codes were byte – pair values Speedcoding; 1954 - IBM 701

**- Pseudo ops for arithmetic and math. functions

  • Conditional and unconditional branching
  • Auto increment registers for array access
  • Only 700 words left for user program**
  • (^) FORTRAN 0 - 1954 - not implemented - FORmula TRANslation
  • (^) FORTRAN I – 1957 Designed for the new IBM 704 Environment of development: 1. Computers were small and unreliable 2. Applications were scientific 3. No programming methodology or tools 4. Machine efficiency was most important Impact of environment on design 1. No need for dynamic storage 2. Need good array handling and counting loops 3. No string handling, decimal arithmetic, or **powerful input/output
  • First implemented version of FORTRAN and the first widely accepted compiled high level language
  • Names could have up to six characters (2 in Fortran0)
  • Posttest counting loop (DO)
  • Formatted I/O
  • User-defined subprograms
  • Three-way selection statement (arithmetic IF)
  • No data typing statements
  • No separate compilation
  • Programs larger than 400 lines rarely compiled correctly, mainly due to poor reliability of the 704
  • Quickly became widely used**
  • (^) LISP – 1959 ( Functional Programming) **LISt Processing language (Designed at MIT by McCarthy & Marvin) First Functional Programming Language AI research needed a language that:
  1. Process data in lists (rather than arrays)
  2. Symbolic computation (rather than numeric) Only two data types: atoms and lists Atoms are either symbols or numeric literals Lists are specified by delimiting their elements with parentheses. Ex: (A (BC) D (E (FG))) Syntax is based on lambda calculus Pioneered functional programming No need for variables or assignment Control via recursion and conditional expressions Still the dominant language for AI COMMON LISP and Scheme are contemporary dialects of LISP ML, Miranda, and Haskell are related languages**
  • (^) ALGOL 58 - 1958

Goals of the language:

**1. Syntax should be Close to mathematical notation

  1. Good for describing algorithms
  2. Must be translatable to machine code**

Language Features:

Concept of type was formalized Names could have any length Arrays could have any number of subscripts Parameters were separated by mode (in & out) Compound statements ( begin ... End ) Semicolon as a statement separator Assignment operator was := (Var := exp ) if had an else-if clause

  • (^) COBOL – 1960 Features: English names for arithmetic operators Data and code were completely separate **Verbs were first word in every statement Design goals:
  1. Must look like simple English
  2. Must be easy to use, even if that means it will be less powerful** 3. Must broaden the base of computer users 4. Must not be biased by current compiler problems - Contributions: **- First macro facility in a high-level language
  • Hierarchical data structures (records)
  • Nested selection statements
  • Long names (up to 30 characters), with hyphens
  • Data Division**
  • (^) BASIC – 1964 Biginner’s All purpose Symbolic Instruction Code Designed by Kemeny & Kurtz at Dartmouth - (^) Widespread use but with little respect - (^) Ignored by computer Scientists - (^) Very popular on microcomputers ( 1970 80 ) - (^) Easy for beginners to learn, less memory Design Goals: Easy to learn and use for nonscience students Must be ”pleasant and friendly" Fast turnaround for homework Free and private access User time is more important than computer time Current popular dialects:
  • (^) Quick BASIC
  • (^) Visual BASIC
  • (^) SNOBOL(1964) - Designed as a string manipulation language (at Bell Labs by Farber, Griswold, and Polensky) - Powerful operators for string pattern matching - Application – Writing text editors
  • (^) SIMULA 67 – 1967 Designed primarily for system simulation (in Norway by Nygaard and Dahl) Based on ALGOL 60 and SIMULA I Primary Contribution: Coroutines a kind of subprogram Implemented in a structure called a class Classes are the basis for data abstraction Classes are structures that include both local data and functionality
  • (^) Pascal – 1971 - Designed by Wirth - Designed for teaching structured programming - Small, simple, nothing really new - Most widely used language for teaching programming in colleges
  • (^) C – 1972 Designed for systems programming (at Bell Labs by Dennis Richie) Evolved primarily from B, but also ALGOL 68 Powerful set of operators, but poor type checking Initially spread through UNIX
  • (^) Prolog – 1972 - Developed at the University of Aix-Marseille, by Comerauer and Roussel, with some help from Kowalski at the University of Edinburgh - Based on formal logic - Non-procedural - Can be summarized as being an intelligent database system that uses an inferencing process to infer the truth of given queries
  • (^) Smalltalk 19721980 Developed at Xerox PARC, initially by Alan Kay, later by Adele Goldberg First full implementation of an objectoriented language (data abstraction, inheritance, and dynamic type binding) Pioneered the graphical user interface everyone now uses
  • (^) C++ 1985 Developed at Bell Labs by Bjarne Stroustrup Evolved from C and SIMULA 67 Facilities for objectoriented programming, taken partially from SIMULA 67, were added to C Also has exception handling A large and complex language, in part because it supports both procedural and OO programming Rapidly grew in popularity, along with OOP ANSI standard approved in November, 1997
  • (^) Eiffel - 1992 - a C++ related language that supports OOP - (Designed by Bertrand Meyer) - Not directly derived from any other language - Smaller and simpler than C++, but still has most of the power
  • (^) **Java - 1995
  • Developed at Sun in the early 1990s
  • Based on C++** - Significantly simplified - Supports only OOP - Has references, but not pointers - Includes support for applets and a form of concurrency

Object Oriented

Languages

 Object oriented programming was

introduced by Xerox with the language

Smalltalk. The other OOPS languages

include C++, Eiffel and Java.

 The most widely used object oriented

language is C++ which provides object

extensions to C, but this is rapidly being

overtaken by Java.

 Object oriented programming is

characterized by the defining of classes of

objects, and their properties.

 Object oriented programming has proved to

be particularly successful in the design of

user interfaces.

Declarative Languages

 Declarative languages, also called

nonprocedural are programming languages

in which a program specifies what is to be

done rather than how to do it.

 In such languages there is less difference

between the specification of a program and its

implementation than in the procedural

languages described so far.

 The two common kinds of declarative

languages are logic and functional

languages.

 The other Declarative languages include

Constraint programming and Domain-

specific languages.

Functional languages

cont…

The design of functional programming is based on mathematical functions (mapping) A lambda (λ) expression specifies the parameters and the mapping of a function in the following form

 λ(X) xxx for the function cube

 (^) Ex. ( λ(X) xxx )(3)** = 27= 27 Functional Forms : A Functional Form is one that either takes functions as parameters or

yields a function as its result or both.

 Function Composition : h≡f◦g means

h(x)=f(g(x))

 (^) Ex. Let f(x) = xxx** , g(x) = x+3 then f◦g = (x+3)(x+3)(x+3)**

 Construction : [f, g]

 (^) Ex. Let f(x)=xxx, g(x) = x+3** then [[ f,g] (4)=(64,7)

 Apply to all: α

 (^) Ex. Let h(x) = xxx** then α(h(3,2,4)) = ( 27,8,64)

Logic Programming

 Programming that uses a form of symbolic

logic as a programming language is often

called logic programming.

 Logic programming is based on predicate

logic. Prolog is a logic programming language

 Programming in such language describe the

form of the result.

 Logic programming is all about predicates that

express relations that hold between values.

 Predicates have a name and an arity, meaning

the number of arguments between which they

express a relation.

 (^) For example: grandfather(Prakash, Suraj) if father(Prakash, Anand), father(Anand, Suraj) expresses that the grandfather relation holds between the values Prakash and Suraj, if the father relation holds between Prakash and Anand, and if also the