<<

History of Programming Languages

Giuseppe De Giacomo

Università degli Studi di Roma “La Sapienza” http://www.dis.uniroma1.it/~degiacomo/

Ingegneria Informatica Corso di Storia dell’Informatica A.A.2005/06 2

Giuseppe De Giacomo Color timeline http://www.oreilly.com/news/graphics/prog_l ang_poster.pdf Original programming language timeline http://www.levenez.com/lang/history.html

Programming Languages Timeline • • History of Programming Languages 3

Giuseppe De Giacomo

The 50’s •Fortran •Lisp • Cobol History of Programming Languages 4

John Backus

M 704 B I

(cf. Backus-Naur Form – BNF)

Giuseppe De Giacomo (IBM 704) - first computer with floating point math Programming languages for scien tific computations till 1978! Then FORTRAN 77 (ANSI 1978) (1954) by and his group @ IBM integers and floating points) (its includes object-oriented features!)

FORTRAN History of Programming Languages •dard in 1966) the most used IV (1962, ANSI stan FORTRAN • Still used for scientific calculations • Current standard version FORTRAN 90 • “FORmula FORTRAN: TRANslating system” • First high level language • First (industrial) compiled language • code Excellent compiled • on scientific calculations (originally it had only Focused • Strongly influenced by hardware 5 N3 , N2

Giuseppe De Giacomo , N1 ) last , = first riable typing, strings, logical if, N1 var IF ( arithmetic expression DO no recursion dynamic memory allocation ⇒ integers, others are floating points subroutines (procedures) with parameters •Mathematical if: • Originally only integer and floating point (real) • No explicit variable type declaration: variables starting by I,J,K,L,M,N are • No stack, no heap •Mathematical • Definite iteration: FORTRAN • Goto: lots of them! • Arrays (max 3 dimensional), only complex type • FORTRAN IV introduced explicit va • FORTRAN 77 introduced, structured control flow primitives and arrays History of Programming Languages 6

Giuseppe De Giacomo

DATA ICARD,IPRT /2,3/ REAL A,B,C REAL DISCR,XR1,XR2,VX,VY,FL,FPY WRITE(IPRT,901) IF (A) 110,9000,110 CALL QUADR(A,B,C,DISCR,XR1,XR2,VX,VY,FL,FPY) WRITE(IPRT,903) DISCR WRITE(IPRT,904) VX,VY WRITE(IPRT,905) FL WRITE(IPRT,906) VX,FPY IF (DISCR) 120,130,140 // JOB // FOR *LIST SOURCE PROGRAM *IOCS(CARD,1132 PRINTER) *ONE WORD INTEGERS C------C PROCESS DATA CARDS WITH A,B,C C UNTIL A=0 C------901 FORMAT(' ------') C READ A B C, IF A=0 THEN EXIT 100 READ(ICARD,801)A,B,C 801 FORMAT(3F8.3) C EXIT WHEN A IS ZERO C PRINT A B C 110 WRITE(IPRT,902)A,B,C 902 FORMAT(' QUADRATIC A=',F8.3,' B=',F8.3,' C=',F8.3) C COMPUTE AND PRINT THE CRITICAL VALUES 903 FORMAT(' DISCRIMINANT=',F9.4) 904 FORMAT(' VERTEX X=',F9.4,' Y=',F9.4) 905 FORMAT(' FOCAL LENGTH=',F9.4) 906 FORMAT(' FOCAL POINT X=',F9.4,' Y='F9.4) QUADR SUBROUTINE QUADR(A,B,C,DISCR,X1,X2,VX,VY,FL,FPY) REAL A,B,C,DISCR,X1,X2,VX,VY,FL,FPY DISCR = B**2.0 - 4.0*A*CVX = -B / (2.0*A) VY = A*VX**2.0 + B*VXFL + C = 1.0 / (A * 4.0) FPY = VY + FL FL = ABS(FL) IF(DISCR) 110,120,130 X2 = SQRT(-DISCR) / (2.0*A) RETURN X2 = X1 RETURN X2 = (-B - SQRT(DISCR)) / (2.0*A) RETURN END // JOB // FOR *LIST SOURCE PROGRAM *ONE WORD INTEGERS C------C COMPUTE THE CRITIAL VALUES FOR A QUADRAITIC EQN C 0=A*X**2+B*X+C C RETURNS DISCRIMINANT, ROOTS, VERTEX, FOCAL LENGTH, FOCAL POINT C X1 AND X2 ARE THE ROOTS C------C DISCRIMINANT, VERTEX, FOCAL LENGTH, FOCAL POINT Y C COMPUTE THE ROOTS BASED ON THE DISCRIMINANT C -VE DISCRIMINANT, TWO COMPLEX ROOTS, REAL=X1, IMG=+/-X2 110 X1 = -B / (2.0*A) C ZERO DISCRIMINANT, ONE REAL ROOT 120 X1 = -B / (2.0*A) C +VE DISCRIMINANT, TWO REAL ROOTS 130 X1 = (-B + SQRT(DISCR)) / (2.0*A) C C NEXT STORE SUBROUTINE ON DISK USING DUP // DUP *DELETE *STORE WS UA QUADR FORTRAN IV example History of Programming Languages 7

Giuseppe De Giacomo GO TO 200 GO TO 200 GO TO 100 END

FORTRAN IV example History of Programming Languages C ZERO DISCRIMINANT, ONE REAL ROOT 130 WRITE(IPRT,912) XR1 912 FORMAT(' ROOT X =',F9.4) C +VE DISCRIMINANT, TWO REAL ROOTS 140 WRITE(IPRT,911) XR1, XR2 911 FORMAT(' ROOTS X1=',F9.4,' X2=',F9.4) C --- GO TO 200 C END OF QUAD 200 WRITE(IPRT,901) C END OF PROGRAM C DATA FOLLOWS XEQ CARD 9000 CALL EXIT // XEQ +001.000+000.000+000.000 +001.000+002.000+003.000 +002.000+002.000+000.000 +002.000+000.000-004.000 +000.500+000.000-004.000 +000.250+002.000-002.000 -004.000+000.000-004.000 +002.730-007.200-003.750 +000.000+000.000+000.000 C -VE DISCRIMINANT, TWO COMPLEX ROOTS 120 WRITE(IPRT,913) XR1, XR2 913 FORMAT(' COMPLEX ROOTS =(',F9.4,' +/-',F9.4,'I)') 8

of the text that

Giuseppe De Giacomo Columns 73..80 were cards sequence number(in case they needed to be resorted)

a rigid formatting a rigid formatting Columns 7.. 72 for writing statements Columnfor 6 from continuing previous statement

Fortran punch cards History of Programming Languages

Columns for 1..5 statement numbers Fortran (‘till FORTRAN 77) used to have programs to insert used the IBM 704 punch cards from inherited was 9

Giuseppe De Giacomo the IBM 704 EDPM” - (1956) very the http://www.fh-jena.de/~kleine/history/languages/ first manual FortranAutomaticCodingSystemForTheIBM704.pdf http://community.computerhistory.org/scc/projects/FO RTRAN/paper/p165-backus.pdf http://www.pbm.com/~lindahl/real.programmers.html

FORTAN references • et al: “The FORTRAN Automatic Backus Coding System for • Backus’s “History of FORTRAN I, II, III” • Programmers Don’t Use Pascal” “Real History of Programming Languages 10

John McCarthy active! very He’s still

(cf. , Logic) Artificial (cf. Giuseppe De Giacomo ☺ onal programming language) (Common Lisp Object System, with OO features) –Scheme – Lisp Common –CLOS (1958) by John McCarthy @ MIT (theory of mathematical functions - Church&Kleene ’30s ) in (still the best known functi

LISP History of Programming Languages • “LISt LISP: Processing language” • LISP: “Lots of Irritating Superfluous Parentheses” • on Lambda Calculus Based • functional programming Introduces • Main language used in AI • By now surprisingly efficient • Emacs and AutoCad• are implemented in LISP Parentheses are not a scandal anymore cf. XML • Current versions 11 Guy L. Steele, Jr. Gerald Jay Sussman nowJava working on coauthorthe of ISCP book

Giuseppe De Giacomo – (Steele&Sussman) Scheme – 1994) (ANSI Lisp Common ): pointers and records effect

LISP History of Programming Languages •Recursion • Introduces linked lists (a very powerful complex • Dynamic memory allocation • Efficiency through shared memory without side • collection (cf Garbage JAVA) • recursion optimization tail • Metaprogramming • Mature versions surprisingly efficient • Static vs dynamic scope dialects for a long time • main variants (both with static scope) Two 12 eval forces a further evaluation argument on the list

Giuseppe De Giacomo 1 (* n (factorial (- n 1))) (if n 1) (<= ) (cons (cdr ‘* ‘(+ 10 20))) ;function definition (define factorial (n) ) (factorial 3) ; output 6 ;metaprogramming (cons ‘* (cdr; output (* 10 20) ‘(+ 10 20))) (eval ) ; output 200 car & cdrcar & were the original name of the 704 IBM assembler macros the performing operation (quote (1 2 3)) (quote abbrev

LISP example ;prefix notation (+ 10 20) ;output 30 (* (+ 10 20) 3) ;output 30 ;quoting ‘(1 2 3) ;output (1 2 3) ;list processing (car ‘(1 2 3) ) ; output 1 (cdr ‘(1 2 3)) ; output (1 2 3) (cons 1 ‘(2 3)) ; output (1 2 3) History of Programming Languages 13 Shared memory (no side effects)

Giuseppe De Giacomo Possible linked lists for lists Possible linked ((A B)(A B))

From:

Linked Lists Linked list for (A (B C) D) History of Programming Languages 14

Giuseppe De Giacomo

Communications Structure and ” (1960) http://www-formal.stanford.edu/jmc/recursive.pdf http://www-formal.stanford.edu/jmc/history/lisp/ lisp.html http://www-mitpress.mit.edu/sicp/ and Their Computation by Machine, Part I. of the ACM Interpretation of Computer Programs http://www.dreamsongs.com/NewFiles/HOPL2-Uncut.pdf • McCarthy’s History of Lisp John • Abelson Harold and Gerald Jay Sussman: “ • Guy L. Steele, Jr., Richard P. Gabriel’s, The Evolution of Lisp LISP references • McCarthy: Recursive Functions of Symbolic Expressions John History of Programming Languages 15

Giuseppe De Giacomo 2 - (4 * A C)) **.5) / QUARED GIVING RESULT-1. GIVING NUMERATOR. ess oriented program ‘till the 80’s ess oriented program GIVING FOUR-A-C. COMPUTE X = (-B + (B ** MULTIPLY B BY GIVING B-SQUARED. MULTIPLY FOUR-A BY C SUBTRACT FOUR-A-C FROM B-S COMPUTE RESULT-2 = RESULT-1 ** .5. SUBTRACT B FROM RESULT-2 MULTIPLY 2 BY A GIVING DENOMINATOR. DIVIDE NUMERATOR BY DENOMINATOR GIVING X. MULTIPLY 4 BY A GIVING FOUR-A. the management should be able to read them (2 * A)

COBOL History of Programming Languages • “Common Business Oriented COBOL: • Language” (1960) that should be so easy to read in English”: program Idea: “Program • by the scientific community Disregarded • The main language to write busin • It introduced the notion of record •Example: • version COBOL 2002 (with object oriented features) Current 16

Giuseppe De Giacomo

The 60’s • Algol-60 •-67 History of Programming Languages 17

) C. A. R. Hoare quicksort, CSP)

(cf. shortest path, Edsger W. Dijkstra

(cf. axiomatic semantics,

Giuseppe De Giacomo ’

C. A. R. Hoare l imperative language ever Turing cf. ADA later) Lecture, and ALGOL-68 addressed them and ALGOL-68 that worked on the original ALGOL-60 ( –If then else then –If – While (several forms) – But still goto – by 1968 concerns on data abstraction become prominent, – Considered too Big and Complex by many of the people (1958-1968) by very many people IFIP(International Federation for InformationBackus, Peter Processing) , including John Naur, AlanMcCarthy, Niklaus Perlis, Friedrich Wirth, C. L. A. Bauer, John Dijkstra R. Hoare, Edsger W. understanding of programming languages improved

ALGOL-60 • ALGOL-60: “ALGOrithmic Language” • effort by Academia and Join Industry • effort by Europe and USA Join • ALGOL-60 the most influentia • language with syntax formally First defined (BNF) • language with structured control structures First • language with … First • (see next) Did not include I/O considered too hardware dependent • ALGOL-60 revised several times in early 60’s, as • ALGOL-68 a major revision History of Programming Languages 18

semaphore) C. A. R. Hoare quicksort, CSP)

(cf. shortest path, Edsger W. Dijkstra

(cf. axiomatic semantics,

Giuseppe De Giacomo

ntics in an similarly easy and –If then else then –If – While (several forms) – But still goto – Call by value – by reference) Call by name (sort of call – Call by value result (later versions) – Call by reference (later versions)

(after such a success with syntax, there was a great hope to being able to formally define sema accessible way: this goal failed so far) STACK (cf. recursion) mechanisms arrays of any dimension; (no records at first), introduced in COBOL), and user defined types

ALGOL-60 • language with syntax formally First defined (BNF) • language with structured control structures First • language with procedure activations based on the First • language with well defended parameters passing First • language with explicit typing of variables First • language with blocks (static scope) First • Data structure primitives: integers, reals, booleans, • Later version had also references and records (originally History of Programming Languages 19 paper orignal From Algol

Giuseppe De Giacomo er> ; fier> | ; | | ( ) ::= lue ; | , array | label switch procedure | | procedure

BNF of ALGOL procedure declaration History of Programming Languages ::= ::= : := | ::= va ::= string | array ::= ::= identifi ::= | ::= procedure heading> 20

Giuseppe De Giacomo b; Absmax (a) Size: (n, m) y:=abs(a[p,q]); i:=p; k:=q × The absolute greatest element of begin end if abs(a[p,q]])>y then for q:=1 step 1 until m do Result: (y) Subscripts: (i, k); Order: (k, p) Result: (y); value k; y := 0; for p:=1 step 1 until n do s:=s+a the matrix a, of size n by m is transferred to y, a nd the subscripts of this element to i and k; procedure comment array a; integer n, m, i, k; real y; begin integer p, q; end Absmax procedure Innerproduct (a, b) integer k, p; real y, a, b; s:=0; for p:=1 step 1 until k do y:=s end Innerproduct (n); value n; 1 then else 0 u · a[i,k]:=a[k,i]; a[k,i]:=w From Algol-60 orignal paper u ∧ · begin w:=a[i,k]; end for k := 1+i step 1 until n do value n; s:=s+a[k,k] procedure Spur (a) Order: array a; integer n; real s; begin integer k; s:=0; for k:=1 step 1 until n do end procedure Transpose (a) Order: (n); array a; integer n; begin real w; integer i, k; for i := 1 step until n do ALGOL example end Transpose integer procedure Step (u); real u; Step:=if 0 History of Programming Languages 21 in Basic Structured code

Giuseppe De Giacomo print i; " squared = "; i * and while in Basic dim i for i = 1 to 10 next print "Program Completed." Spagetti code

Corrado Boehm & Giuseppe Jacopini (“La Edsger Dijkstra: “Goto harmful” is : shows good use of goto Java does not include goto! 1966 Sapienza”): prove that the only control structures needed are if-then-else 1968 1974 1995 ALGOL-60: History of Programming Languages 10 dim i 20 i = 0 30 i = + 1 40 if i <> 10 then goto 90 50 if i = 10 then goto 70 60 goto 30 70 print "Program Completed." 80 end 90 print i; " squared = "; i * 100 goto 30 • Spagetti code • • • • 22

Giuseppe De Giacomo cations of the ACM, 9(5):366-371, ng SIGPLAN Notices Vol. No. 9, 17, e ACM, 9(6):413-432, June 1966. tuebingen.de/users/klaeren/ com/opinions/p75-hoare.pdf ers/EWD/ewd02xx/EWD249.PDF t/algol60/report.htm Introdueces records and references and call by result value result. Communications of the ACM, 6(1):1--17, 1963. http://www.masswerk.a http://www.braithwaite-lee. http://www.cs.utexas.edu/us September 1982 http://www-pu.informatik.uni epigrams.html of ALGOL. Communications of th Programming Systems Languages, and chapterHill, New York, 1960. Introduces 3C, pages the STACK. 221-227. McGraw- with only two1966. formation rules. Communi March 1968. Communications of the ACM, 6(4):261-301, 1974.

ALGOL references • (ed): Revised Report on the Algorithmic Language• Algol-60 In Edsger W. Dijkstra: Recursive programming. In Saul Rosen, editor, • C. and A. R. Hoare: A contribution to the development • A. Hoare: C. The emperor’s old clothes, ACM Lecture 1980 • C. Boehm G. and Jacopini: Flow diagrams, Turing machines, and languages • Edsger W. Dijkstra: Go to• statement . 11(3):147-148, Donald E. Knuth: Structured programming• with 'go to' statments. E. W. Dijkstra: Notes on Structured Programming• EWD249 (1972). Alan J. Perlis: Epigrams on Programmi History of Programming Languages 23

Giuseppe De Giacomo ting Centre in all subsequent languages, iscrete-event simulation, is – Classes – Objects (instances of classes) –ISA – Virtual functions – But, no multiple inheritance Nygaard @ Norwegian Compu abstraction mechanisms in Class by Dahal, was disregarded languages! the first object oriented language but not object orientation, whose value was understood much later.

Simula-67 • (1967) Ole-Johan Simula-67 Dahl Kristen and • realized for d Originally • Based on Algol • for the first time: Introduces • first was the inspiration for introducing data At • The idea of merging the concept type with that of • Object-Oriented to modern similar Surprisingly History of Programming Languages 24

Giuseppe De Giacomo

Simula-67 example (definition) History of Programming Languages 25

Giuseppe De Giacomo

Simula-67 example (use) History of Programming Languages 26

Giuseppe De Giacomo ORSKNINGSDOK_MAPPE/F_OO_start.h es/issue_2002_09/eulogy http://www.jot.fm/issu tml Started http://heim.ifi.uio.no/~kristen/F Language, Comunications o the ACM, v.9, n.9 (September678. 1966), pp. 671-

Simula-67 references History of Programming Languages • Ole-Johan Dahl and : How Object-Oriented Programming • Dahl, Ole-Johan Nygaard, and Kristen: SIMULA--an ALGOL-Based Simulation • memory In of Ole-Johan Dahl Kristen and Nygaard 27

Giuseppe De Giacomo

The 70’s •Pascal •Prolog •Smalltalk History of Programming Languages 28

(today)

(in the ‘60s) Niklaus Wirth Niklaus Wirth

Giuseppe De Giacomo l for developed lation, it also introduced the version of Algo ations because of low support for programming language for large s considered world wide THE s spec. contain an ambiguity: ations were written in TP cintosh were for modularity and separate compi virtual p-machine from a PhD Thesis of Wirth’s student: Urs Ammann (cf, JVM in Java) without making Pascal a viable applications – PC applic many variant of Pascal, still us ed for big applications) equivalence by structure vs equivalence by name is not settled (eq. by name considered a better solution) written in variant of UCSD Pascal modularity and separate compilations modularity and separate language to lean programming on of Technology in Zurich) teaching • but the Technically excellent, •• PASCAL (ISO 1983) UCSD Pascal (1978), Kenneth Bowles @ UCSD, introduced UNITS • Parts of the original Apple Ma • (1983) @ Boreland: uses Units but • (1995) Anders Hejlsberg @ Boreland (object-oriented • Now Anders Hejlsberg is the chief architect of Microsoft C#! • not suitable for applic Originally, •• Structures = Programs Wirth: Algorithms + Data success: ‘till ’80 wa Incredible Pascal • Pascal (1970) Niklaus Wirth @ ETH Zurich (Swiss Federal Institute • Pascal is a cleaned and simplified History of Programming Languages 29

Giuseppe De Giacomo next := k + 1 function next(k: integer): integer; begin end; writeln('The total is: ', j); j := next(j) var : integer; i procedure print(var j: integer); begin end; i := 1; while i <= 10 do print(i)

Pascal example History of Programming Languages program mine(output); begin end. 30

Giuseppe De Giacomo e Development of Pascal. ACM SIGPLAN r.ch/en/niklauswirth.php Pioneers: Contributions to . Springer-Verlag, 2002, http://www.swissdelphicente Notices, Volume 28, No 3, March 1993. Language (AT&T 1981) http://www.lysator.liu.se/c/bwk-on-pascal.html http://www.ddj.com/184404602 1971) 35-63 Verlag, 1974.

Pascal references • Niklaus Wirth: The Programming Language Pascal. Acta Informatica, 1, (Jun • Niklaus Wirth & Kathy PASCAL - Jensen: User Manual Report. Springer- and • Niklaus Wirth: Algorithms + Data Structures = Programs• Prentice-Hall 1975 Niklaus Wirth, M. Broy, ed, and E. Denert, ed: Pascal and its Successors in • Niklaus Wirth: Recollections about th • Brian W. Kernighan C): Why (cf. Pascal is Not My Favorite Programming • Anders Hejlsberg: Dr. Dobb's Excellence Programming in AwardHistory of Programming Languages (2001) 31

Bob Kowalski

Alain Colmerauer

Giuseppe De Giacomo al strength expert systems – Edinburgh Prolog (1982) – Prolog (ISO 1995) ISO with constrain programming (1972) by Alain Colmerauer (with Philippe Roussel) @ U. Marsille, & Robert Kowaski @ Imperial College, London (Horn clauses in particular) (still the best known logic programming language) Systems Project (Japan 1982-1993)

PROLOG History of Programming Languages • Prolog: “PROgrammation en LOGique” • on Logic - Based Calculus Predicate • Kowalski: “Algorithms = Logic + Control” • Logic Programming Introduced • 2° most used language in AI (first is still LISP) • Used for developing industri • Parallel variant at the base of Fifth Generation Computer • Currently many attempts to merge • known version Best 32

Giuseppe De Giacomo – and output interchangeable input – input many output single relation instead of functions computations were one of the motivation for studying nonmonotonic reasoning in AI

PROLOG History of Programming Languages • to functional programming, but based on Similar • single A data structure: the term (as in Logic) • Built in backtracking • easy to write program that perfotm Very complex • and declarative semantics Procedural Study of prolog negation (aka negation as failure) 33 ).

Giuseppe De Giacomo not(v(p1))). p2) false. true(v(p1)). //true. true(v(p1)) :- fail. //false true(v(p2)). //true. true(v(p2)) :- fail. //false true(v(p3)). //true. true(v(p3)) :- fail. //false //sat: ((p1 and p2) not ?- sat(and(and(v(p1),v(p2)), sat(A) :- eval(A 1),v(p2)),v(p3)). eval(A), eval(B). true. ?- eval(v(p3)). false. PROLOG example eval(v(X)) :- true(v(X)). eval(and(A,B)) :- eval(or(A,B) :- eval(A). eval(or(A,B) :- eval(B). eval(not(A) :- not eval(A). true(v(p1)). true(v(p3)). //eval: (p1 and p2) or p3 ?- eval(or(and(v(p History of Programming Languages 34

Giuseppe De Giacomo ACM SIGPLAN conference on History of programming languages, p. 37-52, 1992. http://www.lim.univ-mrs.fr/%7Ecolmer/ArchivesPublications/ HistoireProlog/19november92.pdf Exper. 10(2): 97-125 (1980) 1988.

PROLOG references • Alain Colmerauer and Philippe Roussel: The birth of Prolog, in second • Robert Kowalski: The Early Years of Logic Programming, CACM January • David H. D. Warren: Logic Programming and Writing. Softw., Pract. • John W. Lloyd: Foundations of Logic Programming. Springer, Berlin, 1988. • Keith L. Clark: Negation as Failure. Logic and Data Bases 1977: 293-322 History of Programming Languages 35 Dan Ingalls

Giuseppe De Giacomo –Windows –Mouse Xerox PARC (Palo Alto Center of Research) forcing view that everything is an object, thus thinking in object oriented terms. metaphor representation of objects and classes)

Smalltalk • Smalltalk (1972) by Alan Kay & Dan Ingalls @ • Inspired by Simula67, but takes the radical • Messages and communicating objects • Introduces reflection (ie, runtime • Dynabook • First graphical interface ever • known version Smalltalk-80 Best • No multiple inheritance History of Programming Languages 36

Giuseppe De Giacomo

Smalltalk user interface example History of Programming Languages 37

Giuseppe De Giacomo e/contrib/EarlyHistoryST.html HTML/essays/dynabook_revisited. iscellaneous/alan-kay/turing- lltalk/byte_aug81/design_princi http://www.smalltalk.org http://gagne.homedns.org/%7etgagn http://www.artmuseum.net/w2vr/archives/Kay/01_Dynabook.html#top http://www.squeakland.org/school/ htm Award lecture 2004 http://www.cs.uni.edu/~wallingf/m transcript.html August 1981. http://users.ipa.net/~dwighth/sma ples_behind_smalltalk.html

Smalltalk references • Smalltalk site: • Alan C. Kay: The Early History of Smalltalk, Apple 1993 Computer • Daniel H. H. Ingalls: Design Principles Behind Smalltalk, BYTE Magazine, • the Dynabook: On • Dynabook revised: an interview with Alan Kay • Alan Kay: First Courses C. in Should be Child's Play, ACM Turing History of Programming Languages 38 Dannis Ritchie

Giuseppe De Giacomo better that Fortran’s similar (eg, no nested definitions separate files to Assembler systems mechanisms

C • & Brian Kernighan @ AT&T (1978) C • For programming UNIX operative system • Similar to Pascal but simplified in many ways a language • Modularization and separate compilation supported via • on library IO • Dynamic memory management on library • Extensive library collections • Very efficient compiled code • No concurrency in the language but access to operative • Data structure integers, reals, arrays, records, references • Explicit manipulation of references • by value only (but of references as well) Call • syntax for basic instruction is taken from C Java • ANSI C (1988) History of Programming Languages 39 rts an array of ints

Giuseppe De Giacomo arrayLength) && flag; i++) temp = array[j + 1]; array[j + 1] = array[j]; array[j] = temp; flag = 1; if (array[j + 1] > array[j]) { } flag = 0; for(j = 0; j < (arrayLength{ - i); j++) } int i, j, flag = 1; int temp; for(i = 1; (i <= { } /* Bubble sort function. So in descending order. */ void bubble_sort(int int array[], { arrayLength) } plays each element of input_array[], int printf("%d ", input_array[i]); int nums[5] = {20, 31, 17, 47, 14}; int nums_length = 5; printf("Unsorted Array:\n"); display_array(nums, nums_length); bubble_sort(nums, nums_length); printf("Sorted Array:\n"); display_array(nums, nums_length); return 0; int i; for (i = 0; i < input_size; i++) { } printf("\n\n");

C example History of Programming Languages #include int main() { } /* Function that simply dis input_array. */ void display_array(int input_size) { } 40

Giuseppe De Giacomo e C Programminge C Language. Also known 0-131-10362-8. ANSI C. 0-131-10163-3. Pre-ANSI C. ISBN 0-133-26224-3. Language by Dennis M. Ritchie om/cm/cs/who/dmr/ – 1st, Prentice Hall 1978; ISBN – 2nd, Prentice Hall 1988; ISBN – Prentice 4th, Hall 1994; – Prentice 5th, Hall 2002; ISBN 0-130-89592-X. as K&R — The original book on C. http://cm.bell-labs.com/cm/cs/who/dmr/chist.html http://cm.bell-labs.c

C references • Brian Kernighan, Dennis Ritchie: Th • Samuel P. Harbison, Guy L. Steele: C: A Reference Manual. • The Development of the C • Dennis M. Ritchie’s homepage History of Programming Languages 41

Giuseppe De Giacomo

The 80’s •-2 •Ada History of Programming Languages 42

Giuseppe De Giacomo – Structured programming (as Pascal & Algol) – Data abstraction –Modularity while keeping the language simple efficient low level access – was used as the only programming language for workstations @ ETH Zurich constructs and generics

Modula-2 • (1980) Niklaus Modula-2 Wirth• ETH Zurich @ Extends Pascal so as to deal with very large programs • Introduces a very well defined and refined notion of module • Introduces high level forms of concurrency: monitors and • Main concerns: • not object oriented Was • Current version (ISO 1999) extended with object oriented History of Programming Languages 43

Giuseppe De Giacomo

Modula-2 example (definition) History of Programming Languages 44

Giuseppe De Giacomo

Modula-2 example (use) History of Programming Languages 45

Giuseppe De Giacomo Software -Software Practice 7, 3-84 (1977). Experience, and http://www.modulaware.com/mdlt52.htm 2 by Niklaus March Wirth, http://users.ugent.be/~fschoonj/modula2/wirth- 1980 modula2/Wirth_Modula2.pdf http://www.excelsior-usa.com/doc/isom2.html

Modula-2 references • Niklaus Wirth: Design and Implementation of Modula. • Niklaus Wirth: A Brief History of Modula and Lilith • Niklaus Wirth: ETH Report 36. The original report on Modula- • Modula-2 Language ISO Reference History of Programming Languages 46 Jean David Ichbiah

Giuseppe De Giacomo ed with object oriented France and his team (and may other in fact) also European Economic Community through a series of competitions though by Augustus De Morgan, fascinated by 's mechanical calculating machine, considered the first programmer. constructs • Ada (ANSI 1983) by Jean David Ichbiah @ Honeywell Bull, Ada • under contract by U.S. Department of Defense (DoD), and • Ada stands for Ada Lovelance daughter of Lord Byron, • Main idea: being the ultimate programming language • Based on Pascal and Algol• but also Simula Very comprehensive • for many, such as C.A.R Hoare, too big, Algol-68 big, • Modularity (“packages”) • Data abstraction • Parallel processing •Generics • Not object oriented • version ADA95 extend Current History of Programming Languages 47

Giuseppe De Giacomo

Ada example (definition) History of Programming Languages 48

Giuseppe De Giacomo

Ada example (use) History of Programming Languages 49

Giuseppe De Giacomo

Ada generics example (definition) History of Programming Languages 50

Giuseppe De Giacomo

Ada generics example (use) History of Programming Languages 51

Giuseppe De Giacomo lus Language Reference Manual, e Engineering with Ada, Addison- Interview with Jean Ichbiah, the Principal Designer of Ada", Communications the ACM, Volume 27, 1984. 10, p. 990–997, October Number ISBN 0-201-56539-0 Addison-Wesley, 1986 Wesley, http://www.sigada.org/

Ada references • "Ada: Past, Present, Future - An • Barnes: Programming in Ada John p • Grady Booch, Doug Bryan: Softwar • SIGAda ACM -- the Special Interest Group on Ada History of Programming Languages 52

Giuseppe De Giacomo

The 90’s •C++ •Java History of Programming Languages 53

Giuseppe De Giacomo programming language available products, all Microsoft products, most Apple products, etc. –see: http://www.research.att.com/~bs/application s.html

C++ History of Programming Languages • C++ (1985) Bjarne Stroustrup• AT&T @ on C and Simula-67 Based • not SmallTalk But reflection) (no • Standard ISO 1998 • One of the best modern object oriented • Objects can be passed as values or references • Multiple inheritance • Templates (Generics) • Most used language in applications: all Adobe 54 (const Insieme& t)

Giuseppe De Giacomo inizio = Copia(t.inizio); { Rilascia(inizio); } return *this; } … // File Insieme-SS.cpp #include "Insieme-SS.h" Insieme::Insieme() { inizio = NULL; } Insieme::Insieme(const Insieme& t) { inizio = Copia(t.inizio); } Insieme::~Insieme() { Rilascia(inizio); } Insieme& Insieme::operator= { if (this != &t) Appartiene(int,nodo*); int info; nodo* next; Insieme(); Insieme(const Insieme&); ~Insieme(); Insieme& operator=(const Insieme&); bool EstVuoto(); bool Membro(int); void Inserisci(int); void Elimina(int); int Scegli(); nodo* inizio; static bool static void Cancella(int,nodo*&); static nodo* Copia(nodo*); static void Rilascia(nodo*);

C++ example private: History of Programming Languages // File Insieme-SS.h #ifndef INSIEME_SS_H #define INSIEME_SS_H struct nodo { }; class Insieme {public: }; #endif 55

Giuseppe De Giacomo p = p->next; = p q; delete (Appartiene(e,p->next))); (Appartiene(e,p->next))); { nodo* q = p; = q nodo* { } delete p; delete q->info = p->info; = Copia(p->next); q->next return q; if (p->info == e) == e) (p->info if Cancella(e,p->next); else { Rilascia(p->next); { } { nodo* q = new nodo; = new q nodo* { } else return NULL; return else bool Insieme::Appartiene(int || e) == p) nodo* e, ((p->info && NULL) != (p { return } void Insieme::Cancella(int p) //cancella nodo* e, elem NULL) != (p { if dalla lista } p) Insieme::Copia(nodo* nodo* NULL) != (p { if } p) Insieme::Rilascia(nodo* void NULL) != (p { if } temp->info = e; temp->next = inizio; inizio = temp; } { nodo* temp = new nodo;

C++ example History of Programming Languages } void Insieme::Elimina(int e) { Cancella(e,inizio); } int Insieme::Scegli() { return inizio->info; } … // File Insieme-SS.cpp … bool Insieme::EstVuoto() { return inizio == NULL; } bool Insieme::Membro(int{ return Appartiene(e,inizio); } e) void Insieme::Inserisci(int e) // per evitare { if (! Appartiene(e,inizio)) duplicazioni 56

Giuseppe De Giacomo Language (3rd Edition). Addison- Language by Dennis M. Ritchie t.com/~bs/homepage.html http://cm.bell-labs.com/cm/cs/who/dmr/chist.html http://www.research.at Addison Wesley, ISBN 0-201-51459-1. May 1990 Wesley Longman. Reading Mass. USA. 1997 22-28. October 1995 • M. A. Ellis and B. Stroustrup: The Annotated Reference C++ Manual. • Programming Stroustrup: The C++ B. C++ references • B. Stroustrup: A Perspective on ISO Report. Vol C++. The C++ 7/No 8, pp • The Development of the C • Bjarne Stroustrup's homepage History of Programming Languages 57 James Gosling

Giuseppe De Giacomo JDBC, etc. applications

Java History of Programming Languages • (1995) James Java Gosling• and others @ Sun on C, C++, Simula-67, Smalltalk Based • Java • Reflection (class can be checked at runtime) • Objects can denoted only by reference variables • collection Garbage • Single inheritance • Extensive Libraries, eg. Collection Framework, • from Java 1.5 (2004) Generics • Currently the most used language in enterprise 58

Giuseppe De Giacomo hnicalArticles/J2SE/generics/in s/1998/05/birthday.html http://java.sun.com/ http://java.sun.com/docs/overviews/java/java-overview-1.html http://java.sun.com/developer/tec dex.html http://java.sun.com/feature

Java references • home Java site: • The Java Language: an Overview (1995). • Technology: Java The Early Years (2005) • Using and Programming Generics in J2SE 5.0 (2004) History of Programming Languages 59

Giuseppe De Giacomo Languages (7th Edition), Addison Wesley, 2005. these slides were awared) http://awards.acm.org/turing/

An additional references • Robert W. Sebesta. Concepts of Programming • people mentioned in Award Lectures (many Turing History of Programming Languages