CS 403: A Brief History of Programming Languages

Similar documents
Language Translation, History. CS152. Chris Pollett. Sep. 3, 2008.

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

Introduction. A. Bellaachia Page: 1

Chapter 2 Preview. Preview. History of Programming Languages. History of Programming Languages. History of Programming Languages

Chapter 2. 5 * B => A V 6 7 (subscripts) S 1.n 1.n (data types)

PROGRAMMING LANGUAGE PARADIGMS & THE MAIN PRINCIPLES OF OBJECT-ORIENTED PROGRAMMING

2. Evolution of the Major Programming languages

CS508-Modern Programming Solved MCQ(S) From Midterm Papers (1 TO 22 Lectures) BY Arslan

Topic I. Introduction and motivation References: Chapter 1 of Concepts in programming languages by J. C. Mitchell. CUP, 2003.

Question No: 1 ( Marks: 1 ) - Please choose one One difference LISP and PROLOG is. AI Puzzle Game All f the given

CS 113: Introduction to

History of Programming Languages

Chapter 2. Pseudocodes: Speedcoding. 2.2 Minimal Hardware Programming: Pseudocodes. Evolution of the Major Programming Languages

Concepts in Programming Languages

8/23/18. Programming Language Genealogy The Evolution of Programming Languages. Zuse s Plankalkül. Plankalkül Syntax. Machine Code

Programming Language Concepts 1982, 1987, Outline. Period

Principles of Programming Languages. Lecture Outline

PLAGIARISM. Administrivia. Course home page: Introduction to Programming Languages and Compilers

Introduction to Programming Languages and Compilers. CS164 11:00-12:00 MWF 306 Soda

Com S 541. Programming Languages I

Chapter 2. Chapter 2

Lecture 1: Course Introduction

Lecture 1: Course Introduction

Software II: Principles of Programming Languages

Organization of Programming Languages (CSE452) Why are there so many programming languages? What makes a language successful?

CSCI.4430/6969 Programming Languages Lecture Notes

Chapter 2 Evolution of the Major Programming Languages Chapter 2 Topics

8/27/17. CS-3304 Introduction. What will you learn? Semester Outline. Websites INTRODUCTION TO PROGRAMMING LANGUAGES

Lecture 09. Ada to Software Engineering. Mr. Mubashir Ali Lecturer (Dept. of Computer Science)

Functional Programming. Big Picture. Design of Programming Languages

Chapter 2. Evolution of the Major Programming Languages ISBN

Chapter 2. Evolution of the Major Programming Languages ISBN

Logic Programming II & Revision

Chapter 2. Evolution of the Major Programming Languages

Chapter 2. Evolution of the Major Programming Languages

1. true / false By a compiler we mean a program that translates to code that will run natively on some machine.

Programming Languages CMSC 4023 Chapter 2

Programming Languages, Summary CSC419; Odelia Schwartz

Monadic Parsing. 1 Chapter 13 in the book Programming in Haskell (2nd ed.) by. 2 Chapters 10 and 16 in the book Real World Haskell by Bryan

CS 430 Spring History of Programming Languages. Mike Lam, Professor. John McCarthy ( ) Inventor of LISP

Programmiersprachen (Programming Languages)

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen

Lecture 2. A Historical View

COSC 2P90 Programming Languages & Object-Orientation

History 5/8/18 CONCLUSION. Punch cards

CS2110 CONCLUSION Spring 2018

Early Calculating Tools

A Tour of Language Implementation

A Brief History of Computer Science

Chapter 1. Preliminaries

Babylon. CMSC 330: Organization of Programming Languages. A Babylonian Algorithm. More About Algorithms. Charles Babbage ( )

CS2303 C14 Systems Programming Concepts. Bob Kinicki

Outline. Programming Languages 1/16/18 PROGRAMMING LANGUAGE FOUNDATIONS AND HISTORY. Current

Computers in Engineering COMP 208. A Brief History. Mechanical Calculators. A Historic Perspective Michael A. Hawker

Computers in Engineering COMP 208

Evolution of the Major Programming Languages

Continuations provide a novel way to suspend and reexecute

High Performance Computing - Evolution of Computer Languages and Programming Paradigms. Prof Matt Probert

SOFTWARE ARCHITECTURE 6. LISP

Comp 333: Concepts of Programming Languages Fall 2016

Why are there so many programming languages? Why do we have programming languages? What is a language for? What makes a language successful?

MIDTERM EXAMINATION - CS130 - Spring 2005

15. Functional Programming

Chapter 1: An Introduction to Computer Science. Invitation to Computer Science, C++ Version, 6-th Edition

Principles in Programming: Orientation & Lecture 1. SWE2004: Principles in Programming Spring 2014 Euiseong Seo

Evolution of PL s. EECS 476, Prog. Lang. Design/ page 1

Imperative Programming

CMSC 330: Organization of Programming Languages. A Brief History of Programming Languages

Programming Languages (CSCI 4430/6430) History, Syntax, Semantics, Essentials, Paradigms

Concepts of Programming Languages

CMSC 330: Organization of Programming Languages

Outline. Introduction to Programming (in C++) Introduction. First program in C++ Programming examples

CS 242. Fundamentals. Reading: See last slide

NOTE: Answer ANY FOUR of the following 6 sections:

Chapter 5 Names, Binding, Type Checking and Scopes

! Broaden your language horizons! Different programming languages! Different language features and tradeoffs. ! Study how languages are implemented

CS 565: Programming Languages. Spring 2008 Tu, Th: 16:30-17:45 Room LWSN 1106

Seminar in Programming Languages

LECTURE 18. Control Flow

Early computers (1940s) cost millions of dollars and were programmed in machine language. less error-prone method needed

Chapter 1. Preliminaries

CSc 372. Comparative Programming Languages. 2 : Functional Programming. Department of Computer Science University of Arizona

CS 50 Introduction to Computer Science I

CSC 326H1F, Fall Programming Languages. What languages do you know? Instructor: Ali Juma. A survey of counted loops: FORTRAN

CS A331 Programming Language Concepts

Introduction. chapter Functions

Fundamentals of Programming Languages. PL families Lecture 02 sl. dr. ing. Ciprian-Bogdan Chirila

Design & Implementation Overview

Chapter 1 Preliminaries

Why study Programming Language Concepts? Chapter One. Language Evaluation Criteria. Programming Domains. Readability Writability Reliability Cost

Chronological History of the Pre-Computer Developments

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 01, SPRING 2013

CS101 Introduction to Programming Languages and Compilers

Modern Programming Languages. Lecture LISP Programming Language An Introduction

Introduction P L COS 301. Fall School of Computing and Information Science University of Maine. Introduction COS 301.

Engineering Problem Solving with C++, Etter/Ingber

CMSC 330: Organization of Programming Languages

CS1100 Introduction to Programming

Copyright 2012 Pearson Education, Inc. Publishing as Prentice Hall

Computer science First Class Lecture 1

Transcription:

CS 403: A Brief History of Programming Languages Stefan D. Bruda Fall 2017

HISTORY OF PROGRAMMING LANGUAGES Prehistory The 1940s: von Neumann and Zuse The 1950s: The first programming language The 1960s: An explosion in programming languages The 1970s: Simplicity, abstraction, study The 1980s: Consolidation and new directions The 1990s: The explosion of the World Wide Web The next century CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 1 / 21

PREHYSTORY Cuneiform writing used in the Babylon, founded by Hammurabi around 1790 BC poems, stories, contracts, records, astronomy, math Famous Babylonian math tablet (Plimpton 322) involving Pythagorean triples, a 2 + b 2 = c 2 with a mistake! (or bug) Weird math (base 60!) two characters to express a (base-60) digit decimal point not specified (must be figured out from context) CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 2 / 21

WRITTEN LANGUAGE TO DESCRIBE COMPUTATIONAL PROCEDURES A cistern. The length equals the height. A certain volume of dirt has been excavated. The cross-sectional area plus this volume comes to 110. The length is 30. What is the width? You should multiply the length, 30, by... Translation by Donald Knuth No variables Instead, numbers serve as a running example of the procedure being described This is the procedure Programming is among the earliest uses to which written language was put Programming languages design has tried to get as close to that as possible from the very beginning... CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 3 / 21

ALGORITHMS Abū Abdallāh Muḥammad ibn Mūsā al-khwārizmī, or Mohammed Al-Khorezmi for short (Baghdad, 780 850 BC) One little book: The Compendious Book on Calculation by Completion and Balancing Compilation and extension of known rules for solving quadratic equations and other problems Used as a mathematics text in Europe for eight hundred years The book is considered the foundation of algebra Invention of the notions of algorithms and data structures Other early algorithms: Euclid (300 BC): an algorithm for computing the GCD of two numbers Eratosthenes (about same time): one of the most efficient algorithms for finding small primes (the sieve of Eratosthenes) Alexander de Villa Dei (1220 AD): Canto de Algorismo = algorithms in Latin verse Natural language (even poetry!) plus math rather than programming languages CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 4 / 21

THE FIRST PROGRAMMING ENVIRONMENTS Jacquard loom (early 1800s) translated card patterns into cloth designs Charles Babbage s Analytical Engine (1830s & 40s) First programmer: Augusta Ada King, Countess of Lovelace (today commonly known as Ada Lovelace) The engine can arrange and combine its numerical quantities exactly as if they were letters or any other general symbols; and in fact might bring out its results in algebraic notation, were provision made. Programs were punched cards containing data and operations CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 5 / 21

THE 1940S: VON NEUMANN AND ZUSE Harvard Mark I (1943) Howard Aiken (IBM), Grace Hopper (Navy) first electro-mechanical computer Harvard Mark II: First computer bug ENIAC (1946) Presper Eckert, John Mauchly (U. Penn.) First electronic computer Programming was manual, with switches and cables John von Neumann led a team that built computers with stored programs and a central processor (as we know them today) Konrad Zuse designed the first programming language as we know it (Plankalkul = program calculus) In Germany, in isolation because of the war; work finally published in 1972 Advanced data type features: floating point, arrays, records Invariants for correctness Rather cumbersome notation A[7] := 5 B[6] Never implemented 5 B A V 6 7 (subscripts) S 1.n 1.n (data types) CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 6 / 21

THE FIRST COMPUTER BUG! CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 7 / 21

THE 1950S: THE FIRST PROGRAMMING LANGUAGES FORTRAN (1957, John Backus) FORmula TRANslator designed for scientific programming Many new features over time: FORTRAN II, FORTRAN IV, FORTRAN 66, FORTRAN 77 (structured programs, char s), Fortran 90 (arrays, modules), Fortran 2003 (objects), Fortran 2008 (concurrent programming) Very efficient compilation COBOL (1960, Grace Hopper) mathematical programs should be written in mathematical notation, data processing programs should be written in English statements G. Hopper, 1953 Committee sponsored by US Department of Defence Biggest contribution was the idea that programs should be written in a way that is easily understood Adopted widely by businesses for record-keeping applications Record structure, separation of data from execution part, versatile formatting of output using pictures ANSI standards (1968, 1974, 1985) CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 8 / 21

FORTRAN EXAMPLE IMPLICIT INTEGER (A-Z) DIMENSION ORD(N),POPLST(2,20) INTEGER X,XX,Z,ZZ,Y INTEGER A(N) NDEEP=0 U1=N L1=1 DO 1 I=1,N 1 ORD(I)=I 2 IF (U1.LE.L1) RETURN 3 L=L1 U=U1 4 P=L Q=U X=A(ORD(P)) Z=A(ORD(Q)) IF (X.LE.Z) GO TO 5... 5 CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 9 / 21

COBOL EXAMPLE ENVIRONMENT DIVISION. CONFIGURATION SECTION. SOURCE-COMPUTER. IBM-4381. OBJECT-COMPUTER. IBM-4381. DATA DIVISION. WORKING-STORAGE SECTION. 01 INPUT-FIELD. 05 INPUT-VALUE PIC 99 VALUE ZERO. 01 CALCULATION-FIELD. 05 SUM-VALUE PIC 9(03) VALUE ZERO. 05 AVERAGE-VALUE PIC 9(03)V99 VALUE ZERO. 01 OUTPUT-FIELD. 05 EDIT-FIELD PIC ZZ9.99 VALUE ZERO. PROCEDURE DIVISION. 1000-MAIN. PERFORM 2000-INPUT-ADD 10 TIMES. DIVIDE 10 INTO SUM-VALUE GIVING AVERAGE-VALUE. 2000-INPUT-ADD.... CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 10 / 21

THE 1950S: THE FIRST LANGUAGES (CONT D) Algol 60 General, expressive language; most current imperatives are derivatives Introduced many modern concepts structured programming reserved keywords type declarations recursion stack dynamic arrays call-by-value user defined types free-format Stack-based run time environment Great success and also great failure (ahead of its time, too complex, lack of I/O, lack of support from IBM) entrenchment of Fortran LISP (John McCarthy, MIT) LISt Processing the main data structure is the (singly linked) list Untyped, messy language, but good for problems we solve by trial and error (quick prototyping) used in many AI applications Historically inefficient on Von Neumann machines Main processing unit: the recursive function influenced the modern functional languages such as ML, Miranda, Haskell Contemporary variants include Common Lisp, Scheme, Emacs Lisp CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 11 / 21

ALGOL EXAMPLE procedure Absmax(a) Size:(n, m) Result:(y) Subscripts:(i, k); value n, m; array a; integer n, m, i, k; real y; comment The absolute greatest element of the matrix a, of size n by m is transferred to y, and the subscripts of this element to i and k; begin integer p, q; y := 0; i := k := 1; for p:=1 step 1 until n do for q:=1 step 1 until m do if abs(a[p, q]) > y then begin y := abs(a[p, q]); i := p; k := q end end Absmax CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 12 / 21

LISP EXAMPLE (defun mapcar (fun list) "Applies FUN on every element of LIST and returns the list of results (iterative version)." (let ((results nil)) (dolist (x list) (setq results (cons (apply # fun x) results))) (reverse results))) (defun mapcar (fun list) "Applies FUN on every element of LIST and returns the list of results (recursive version)." (cons (apply # fun (car list)) (mapcar fun (cdr list)))) CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 13 / 21

THE 1960S: AN EXPLOSION IN LANGUAGES Hundreds of languages were developed PL/1 (1964) Combined features of FORTRAN, COBOL, Algol 60 and more! Translators were slow, huge, and unreliable Some say it was ahead of its time... Algol 68 still ahead of its time! Simula (or what would be called today Object-oriented Algol) BASIC etc. CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 14 / 21

THE 1970S: SIMPLICITY, ABSTRACTION, STUDY Algol-W then Pascal (Nicklaus Wirth and C.A.R.Hoare) small, simple, efficient (reaction against the 60s), ideal for teaching C (Dennis Ritchie) Constructed as a portable assembler to build Unix for various architectures But also has modern features (structured programming, data structures, etc.) The primary API for Unix (Mac OS, Linux, etc.) is still C! Euclid (University of Toronto, 1977) Main goal formal program verification extends Pascal to include abstract data types Scheme (1978, MIT) simplified, cleaner Lisp CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 15 / 21

C EXAMPLE #include <stdio.h> main(t,_,a) char*a; {return!0<t?t<3? main(-79,-13,a+ main(-87,1-_, main(-86, 0, a+1 ) +a)): 1, t<_? main(t+1, _, a ) :3, main ( -94, -27+t, a ) &&t == 2?_ <13? main ( 2, _+1, "%s %d %d\n" ) :9:16: t<0? t<-72? main( _, t, "@n +,# /*{}w+/w#cdnr/+,{}r/*de}+,/*{*+,/w{%+,/w#q#n+,/#{l,+,/n{n+,/+#n+,/#;\ #q#n+,/+k#;*+,/ r : d* 3,}{w+K w K: +}e# ;dq# l q# +d K#!/+k#;\ q# r}ekk#}w r}ekk{nl] /#;#q#n ){)#}w ){){nl] /+#n ;d}rw i;# ){nl]!/n{n# ; \ r{#w r nc{nl] /#{l,+ K {rw ik{;[{nl] /w#q#\ \ n wk nw iwk{kk{nl]!/w{% l##w# i; :{nl] /*{q# ld;r }{nlwb!/*de} c ;;\ {nl -{}rw] /+,}## *}#nc,,#nw] /+kd +e}+;\ # rdq#w! nr / ) }+}{rl# {n )# } +}##(!!/") : t<-50? _==*a? putchar(31[a]): main(-65,_,a+1) : main((*a == / ) + t, _, a + 1 ) : 0<t? main ( 2, 2, "%s") :*a== / CS main(0, 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 16 / 21

THE 1980S: CONSOLIDATION & NEW DIRECTIONS ML mostly functional language (like Lisp) with cleaner (math-like) syntax Prolog (Université Aix Marseille) PROgrammation en LOGique / PROgramming in LOGic describes the problem at hand as known facts and inference rules Notable industrial uses: IBM Watson, Apache UIMA, and the... Buran spacecraft Objects r Us: Smalltalk the purest example of object-oriented language C++ extend a popular language (C) with strongly typed object system Eiffel object-oriented Pascal CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 17 / 21

THE 1990S AND 200S 1990s Java eliminate the non-object-oriented features of C++ Haskell purely functional programming language quicksort [] = [] quicksort (x:xs) = quicksort [y x <- xs, y < x] ++ [x] ++ quicksort [y x <- xs, y >= x] 2000s Python multi-paradigm language (procedural, object-oriented, functional, etc.) Languages for the Web Java applets Languages within Web pages (PHP, server-side includes) Emphasis on cross-platform development Develop on PC, run on cell phones, game consoles, and toasters CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 18 / 21

WHERE ARE WE NOW Computing devices are ubiquitous, and so is the Internet and Web C and C++ are the most widely used system programming languages Java had peaked... and then came Android Most students learn C / C++ or Java Web 2.0 programming (PHP, etc.) COBOL and Java are used for business applications Fortran is the main language on supercomputers We already have Object-Oriented Fortran! C++ is growing Several non-mainstream (but cleaner) languages rising (Ruby, Python, Haskell) but who knows what the future has in store Object-Oriented COBOL? CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 19 / 21

STRANGE LANGUAGES Strange languages definitely exist Case in point: Brainf**k A Brainf**k program has an implicit byte pointer, called the pointer, which is free to move around within an array of 30,000 bytes, initially all set to zero The pointer is initialized to point to the beginning of this array The Brainf**k programming language consists of eight commands, each of which is represented as a single character > Increment the pointer < Decrement the pointer + Increment the byte at the pointer - Decrement the byte at the pointer. Output the byte at the pointer, Input a byte and store it in the byte at the pointer [ Jump past the matching ] if the byte at the pointer is zero ] Jump to the matching [ >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..++ +.[-]>++++++++[<++++>-] <.#>+++++++++++[<+++++>-]<.>+++ +++++[<+++>-]<.+++.------.--------.[-]>++++++++ [ <++++ >-]<+.[-]++++++++++. CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 20 / 21

CHRONOLOGY Fortran Lisp 1960 Algol 60 COBOL APL Snobol 4 Simula PL/1 Algol 68 1970 Smalltalk Pascal Clu C Scheme Prolog 1980 Eiffel Modula 2 Ada C++ ML Miranda ICON Oberon Haskell 1990 Java CS 403: A Brief History of Programming Languages (S. D. Bruda) Fall 2017 21 / 21