CSC302 2005S, Class 2: A Brief History of Languages (and computation) Admin: * Homework a for Friday: Read Gries, 0 and 1 * Note on readings * Homework b for Friday: Explore course Web and answer questions * Sam's frequent absences * "Quiz": Dating ideas + 1. Algorithms + 2. Devices to aid in computation + 3. The general-purpose computer (as opposed to ...) - That is, input, CPU, memory, output + 4. Punch cards + 5. The first programming language + 6. The first implemented programming language + 7. Hypertext Overview * Some historical discussion of key ideas (see above) * Sam's biased perspective on the development of programming languages * Some historical discussion of key ideas (see above) + 1. Algorithms Def'n: A set of instructions that permit us to compute output (a result) given particular inputs Late bce Al'Khorizm + 2. Devices to aid in computation Late bce: E.g. abacus + 3. The general-purpose computer (as opposed to ...) - That is, input, CPU, memory, output von Neumann - 1940's Babbage - late 1800's 3b. First implemented general purspose computer? Early 1950's? ABC - Atanasoff Berry Computer (Iowa State, early 1940's) Harvard-Aiken Mark I - Early 1940's Competing British claim + 4. Punch cards Jacquard loom, mid-1800's, Weaving through punched cards Census use in late 1800's + 5. The first programming language Lady Ada Augusta, Countess of Lovelace, designed language (and programs) for Babbage's computer + 6. The first implemented "high level" programming language FORTAN - 1954-57 or so + 7. Hypertext Early 1940's - Vannevar Bush proposed Memex (Atlantic Monthly) Bush's article prompted Doug Englebart to invent the mouse and much of other modern stuff Talmud is an early hypertext: A series of writings and commentatires and criticisms on the hebrew bible The twelve-minute history of programming languages * First computers: Programmed by rewiring * von Neumann suggests strored-program model * First stored-program programs written as sequence of bits (machine code) - Programmers responsible for memorizing bit-codes - Programmers resopnsible for laying out data * Assembly code: Mnemonics for instructions and data, programmatic conversion to bits * Problems with assembly code - Requires lots of attention to details, such as memory locations - Programmer responsible for lots of extraneous stuff (such as hardware) - When you switch computers, you get a new assembly language * A team at IBM led by John Backus said "We need a higher-level language that can be easily translated to different assembly languages" (FORTRAN) * Yeah, right, those programs will be too slow to be worthwhile * A key goal of FORTRAN was the generation of programs "as good as those written by a competent assembly language programmer" * FORTRAN was a success! Generated good code, relatively quickly, significant increase in outcome for programmer effort Four models of "what is a computer good for?" * Complex numerical calculations: FORTRAN (Imperative) * Management of data: COBOL (Imperative) * Simulating intelligence: LISP (Functional) * Communicating algorithms to each other: ALGOL (Imperative) All late 1950's Object-oriented programming was developed in mid 1960's (Simula-67) Declartive programming (logic programming) in early 1970's (Prolog) Every modern language is, in essence, a variation of one of these models with a little bit better software engineering in the design.