<<

CMSC 331 Fall 2004

• Early History : The first • The 1940s: Von Neumann and Zuse • The 1950s: The First • The 1960s: An Explosion in Programming languages • The 1970s: Simplicity, Abstraction, Study • The 1980s: Consolidation and New Directions • The 1990s: the internet and web • The 2000s: tbd

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 1 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 2

Konrad Zuse and Plankalkul began work on Plankalkul (plan calculus), the • Jacquard loom of early 1800s first algorithmic programming – Translated card patterns into cloth designs language, with an aim of creating the theoretical preconditions for • ’s analytical the formulation of problems of a engine (1830s & 40s) general nature. Programs were cards with data and operations Seven years earlier, Zuse had developed and built the world's • – first first binary digital , the . He completed the first fully “The engine can arrange and combine functional program-controlled its numerical quantities exactly as if electromechanical digital they were letters or any other general computer, the , in 1941. symbols; And in fact might bring out Only the – the most its results in algebraic notation, were sophisticated of his creations -- provision made.” survived World War II.

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 3 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 4

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

• Konrad Zuse (Plankalkul) – in Germany - in isolation because of the war A(7) := 5 * B(6) – defined Plankalkul (program calculus) circa 1945 but never implemented it. | 5 * B => A – Wrote in the language, including a program to play chess. V | 6 7 (subscripts) – His work finally published in 1972. S | 1.n 1.n (data types) – Included some advanced data type features such as » Floating point, used twos complement and hidden »Arrays » records (that could be nested)

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 5 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 6

John Von Neumann led a team that • Initial were programmed in raw built computers machine codes. with stored • These were entirely numeric. programs and a • What was wrong with using machine code? central Everything! processor • Poor readability ENIAC was • Poor modifiability also • Expression coding was tedious programmed • Inherit deficiencies of hardware, e.g., no with patch indexing or floating point numbers cords. Von Neuman with ENIAC

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 7 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 8

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

• Short Code or SHORTCODE - John Mauchly, 1949. • Pseudocodes: interpreters for • Pseudocode interpreter for math problems, on • : the first higher level programming Eckert and Mauchly’s BINAC and later on UNIVAC I and II. language • Possibly the first attempt at a higher level language. • COBOL: he first business oriented language • Expressions were coded, left to right, e.g.: • Algol: one of the most influential programming X0 = sqrt(abs(Y0)) languages ever designed 00 X0 03 20 06 Y0 • Some operations: • LISP: the first language outside the von Neumann 01 – 06 abs 1n (n+2)nd power model 02 ) 07 + 2n (n+2)nd root 03 = 08 pause 4n if <= n • APL: A Programming Language 04 / 09 ( 58 print & tab

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 9 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 10

Speedcoding; 1953-4 • FORmula TRANslator • A pseudocode interpreter for math on IBM701, IBM650. • Developed at IBM under the • Developed by guidance of John Backus • Pseudo ops for arithmetic and math functions primarily for scientific, • Conditional and unconditional branching computational programming • Autoincrement registers for array access • Slow but still dominated by slowness of s/w math • Dramatically changed forever the • Interpreter left only 700 words left for user program way computers used Laning and Zierler System - 1953 • Has continued to evolve, adding new features & concepts. • Implemented on the MIT Whirlwind computer – FORTRAN II, FORTRAN IV, FORTRAN66, FORTRAN77, FORTRAN90 • First "algebraic" system • Always among the most efficient , producing fast • Subscripted variables, function calls, expression translation code • Never ported to any other machine

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 11 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 12

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

FORTRAN 0 – 1954 (not implemented) • Names could have up to six characters FORTRAN I - 1957 • Posttest counting loop (DO I=1, 100) • Formatted I/O Designed for the new IBM 704, which had index registers and • User-defined subprograms floating point hardware • Three-way selection statement (arithmetic IF with GOTO) Environment of development: IF (ICOUNT-1) 100 200 300 Computers were small and unreliable Applications were scientific • Implicit data typing statements No programming methodology or tools variables beginning with i, j, k, l, m or n were integers, Machine efficiency was most important all else floating point Impact of environment on design • No separate compilation • No need for dynamic storage • Programs larger than 400 lines rarely compiled correctly, • Need good array handling and counting loops • No string handling, decimal arithmetic, or powerful mainly due to poor reliability of the 704 input/output (commercial stuff) • Code was very fast • Quickly became widely used

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 13 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 14

Added many features of more modern FORTRAN II - 1958 programming languages, including • Independent compilation •Pointers • Fix the bugs • Recursion • CASE statement FORTRAN IV - 1960-62 • Parameter type checking • Explicit type declarations • Logical selection statement • A collection of array operations, • Subprogram names could be parameters DOTPRODUCT, MATMUL, TRANSPOSE, etc • ANSI standard in 1966 • dynamic allocations and deallocation of FORTRAN 77 - 1978 arrays • Character string handling • a form of records (called derived types) • Logical loop control statement • IF-THEN-ELSE statement • Module facility (similar Ada’s package) CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 15 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 16

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

• COmmon Business Oriented Language • Principal mentor: (Rear Admiral Dr.) Grace Murray Hopper (1906-1992) • Based on FLOW-MATIC which had such features as: • Names up to 12 characters, with embedded hyphens • English names for arithmetic operators • Data and code were completely separate • Verbs were first word in every statement • CODASYL committee (Conference on Data Systems Languages) developed a programming language by the name of COBOL

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 17 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 18

First CODASYL Design Meeting - May 1959 Contributions: Design goals: - First macro facility in a high-level language • Must look like simple English - Hierarchical data structures (records) • Must be easy to use, even if that means it will be less - Nested selection statements powerful - Long names (up to 30 characters), with hyphens - Data Division • Must broaden the base of computer users Comments: • Must not be biased by current compiler problems • First language required by DoD; would have Design committee were all from computer manufacturers failed without DoD and DoD branches • Still the most widely used business applications Design Problems: arithmetic expressions? subscripts? language Fights among manufacturers

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 19 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 20

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

• Beginner's All purpose Symbolic Instruction Code • LISt Processing language (Designed at MIT by McCarthy) • Designed by Kemeny & Kurtz at Dartmouth for the GE • AI research needed a language that: 225 with the goals: • Process data in lists (rather than arrays) • Symbolic computation (rather than numeric) • Easy to learn and use for non-science students and as a path to Fortran and Algol • One universal, recursive data type: the s-expression • Must be ”pleasant and friendly" • An s-expression is either an atom or a list of zero or more • Fast turnaround for homework s-expressions • Syntax is based on the lambda calculus • Free and private access • Pioneered functional programming • User time is more important than computer time • No need for variables or assignment • Well suited for implementation on first PCs (e.g., Gates • Control via recursion and conditional expressions and Allen’s 4K Basic interpreter for the MITS Altair •Status personal computer (circa 1975) • Still the dominant language for AI • COMMON LISP and Scheme are contemporary dialects • Current popular dialects: Visual BASIC • ML, Miranda, and Haskell are related languages CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 21 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 22

Environment of development: • Concept of type was formalized 1. FORTRAN had (barely) arrived for IBM 70x • Names could have any length • Arrays could have any number of subscripts 2. Many other languages were being developed, all for • Parameters were separated by mode (in & out) specific machines • Subscripts were placed in brackets 3. No portable language; all were machine dependent • Compound statements (begin ... end) • Semicolon as a statement separator 4. No universal language for communicating • Assignment operator was := algorithms •ifhad an else-if clause ACM and GAMM met for four days for design Comments: - Goals of the language: •Not meant to be implemented, but variations of it were 1. Close to mathematical notation (MAD, JOVIAL) 2. Good for describing algorithms •Although IBM was initially enthusiastic, all support was 3. Must be translatable to machine code dropped by mid-1959

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 23 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 24

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

Modified ALGOL 58 at 6-day meeting in Paris adding such new features as: Failure: Never widely used, especially in U.S., • Block structure (local scope) mostly because • Two parameter passing methods • Subprogram recursion 1. No i/o and the character set made • Stack-dynamic arrays programs nonportable • Still no i/o and no string handling Successes: 2. Too flexible--hard to implement • It was the standard way to publish algorithms for over 20 years 3. Entrenchment of FORTRAN • All subsequent imperative languages are based on it • First machine-independent language 4. Formal syntax description • First language whose syntax was formally defined 5. Lack of support of IBM (BNF)

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 25 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 26

• designed by K.Iverson at Harvard in late • The development of hundreds of programming 1950’s languages • A Programming Language • PL/1 designed in 1963-4 • A language for programming mathematical – supposed to be all purpose – combined features of FORTRAN, COBOL and Algol60 and more! computations – translators were slow, huge and unreliable – especially those using matrices – some say it was ahead of its time...... • Functional style and many whole array •Algol68 operations •SNOBOL • Drawback is requirement of special keyboard •Simula •BASIC

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 27 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 28

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

• Computing situation in 1964 (IBM's point of view) PL/I contributions: Scientific computing 1. First unit-level concurrency • IBM 1620 and 7090 computers 2. First • FORTRAN 3. Switch-selectable recursion • SHARE user group 4. First pointer data type Business computing 5. First array cross sections • IBM 1401, 7080 computers • COBOL Comments: • GUIDE user group • Many new features were poorly designed • IBM’s goal: develop a single computer (IBM 360) and a • Too large and too complex single programming language (PL/I) that would be good • Was (and still is) actually used for both scientific for scientific and business applications. and business applications • Eventually grew to include virtually every idea in current • Subsets (e.g. PL/) developed which were more practical programming languages. manageable

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 29 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 30

From the continued development of ALGOL 60, but it is not • Designed and built by Ole-Johan Dahl and Kristen a superset of that language Nygaard at the Norwegian Computing Centre (NCC) in Oslo between 1962 and 1967 • Design is based on the concept of orthogonality • Originally designed and implemented as a language for • Contributions: discrete event simulation • Based on ALGOL 60 • User-defined data structures Primary Contributions: • Reference types • Coroutines - a kind of subprogram • Classes (data plus methods) and objects • Dynamic arrays (called flex arrays) • Inheritance • Dynamic binding • Comments: => Introduced the ideas that developed into object- • Had even less usage than ALGOL 60 oriented programming. • Had strong influence on subsequent languages, especially Pascal, C, and Ada

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 31 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 32

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

• Designed by Wirth, who quit the ALGOL 68 • Algol-W - Nicklaus Wirth and C.A.R.Hoare committee (didn't like the direction of that – reaction against 1960s work) – simplicity • Designed for teaching • Pascal • Small, simple – small, simple, efficient structures • Introduces some modest improvements, such as – for teaching program the case statement • C - 1972 - Dennis Ritchie • Was widely used for teaching programming ~ – aims for simplicity by reducing restrictions of the 1980-1995. – allows access to underlying system – interface with O/S - UNIX

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 33 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 34

Other descendants of ALGOL

• Modula-2 (mid-1970s by at ETH) • Designed for systems programming at Bell • Pascal plus modules and some low-level Labs by Dennis Richie and colleagues. features designed for systems programming • Evolved primarily from B, but also • Modula-3 (late 1980s at Digital & Olivetti) ALGOL 68 • Modula-2 plus classes, exception handling, • Powerful set of operators, but poor type garbage collection, and concurrency checking • Oberon (late 1980s by Wirth at ETH) • Initially spread through UNIX and the • Adds support for OOP to Modula-2 • Many Modula-2 features were deleted (e.g., for availability of high quality, free compilers. statement, enumeration types, with statement, noninteger array indices)

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 35 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 36

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

• In study done in 73-74 it was determined that the US DoD was spending $3B annually on software, over •Ada half on embedded computer systems. – US Department of Defence • The Higher Order Language Working Group was – European team lead by Jean Ichbiah formed and initial language requirements compiled and refined in 75-76 and existing languages • Functional programming evaluated. – Scheme, ML, Haskell • In 1997, it was concluded that none were suitable, • Logic programming though Pascal, ALGOL 68 or PL/I would be a good starting point. –Prolog • Language DoD-1 was developed thru a series of • Object-oriented programming competitive contracts. – Smalltalk, C++, Eiffel

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 37 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 38

Contributions: • Renamed Ada in May 1979. 1. Packages - support for data abstraction 2. Exception handling - elaborate • Reference manual, Mil. Std. 1815 approved 10 3. Generic program units December 1980. (Ada Bryon was born 10/12/1815) 4. Concurrency - through the tasking model Comments: • “mandated” for use in DoD work during late 80’s • Competitive design and early 90’s. • Included all that was then known about software • Ada95, a joint ISO and ANSI standard, accepted in engineering and language design February 1995 and included many new features. • First compilers were very difficult; the first really • The Ada Joint Program Office (AJPO) closed 1 usable compiler came nearly five years after the October 1998 (Same day as ISO/IEC 14882:1998 language design was completed (C++) published!) • Very difficult to mandate programming technology CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 39 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 40

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

• Developed at the University of Aix • Common Lisp: consolidation of LISP dialects Marseille, by Comerauer and Roussel, with spured practical use, as did the development of some help from Kowalski at the University Lisp Machines. of Edinburgh • Scheme: a simple and pure LISP like language used for teaching programming. • Based on formal logic • Logo: Used for teaching young children how to • Non-procedural program. • ML: (MetaLanguage) a strongly-typed functional • Can be summarized as being an intelligent language first developed by Robin Milner in the database system that uses an inferencing 70’s process to infer the truth of given queries • Haskell: polymorphicly typed, lazy, purely functional language.

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 41 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 42

• Developed at Xerox PARC by Alan Kay and • Developed at Bell Labs by Stroustrup colleagues (esp. Adele Goldberg) inspired by • Evolved from C and SIMULA 67 Simula 67 • First compilation in 1972 was written on a bet to • Facilities for object-oriented programming, taken come up with "the most powerful language in the partially from SIMULA 67, added to C world" in "a single page of code". • Also has exception handling • In 1980, Smalltalk 80, a uniformly object-oriented programming environment became available as the • A large and complex language, in part because it first commercial release of the Smalltalk language supports both procedural and OO programming • Pioneered the graphical user interface everyone • Rapidly grew in popularity, along with OOP now uses • Saw some industrial use in late 80’s and early 90’s • ANSI standard approved in November, 1997

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 43 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 44

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

During the 90’s, Object-oriented languages •Eiffel - a related language that supports OOP (mostly C++) became widely used in - (Designed by Bertrand Meyer - 1992) practical applications - Not directly derived from any other The Internet and Web drove several language phenomena: - Smaller and simpler than C++, but still has – Adding concurrency and threads to existing languages most of the power – Increased use of scripting languages such as Perl and Tcl/Tk –Javaas a new programming language

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 45 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 46

• Developed at Sun in the early 1990s • Microsoft and Sun were bitter rivals in the with original goal of a language for 90s embedded computers • C# is Microsoft’s answer to Java • Principals: Bill Joy, James Gosling, Mike • C# is very similar to Java with (maybe) Sheradin, Patrick Naughton some minor improvements • Original name, Oak, changed for copyright reasons • If you know Java, learning C# should be • Based on C++ but significantly simplified easy • Supports only OOP • Has references, but not pointers • However: both languages have extensive • Includes support for applets and a form of libraries, and mastering them is a big part of mastering the language. concurrency

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 47 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 48

Printed with FinePrint - purchase at www.softwarelabs.com CMSC 331 Fall 2004

• Scripting languages like Perl, Ruby, • The 60’s dream was a single all purpose language (e.g., Javascript and PHP have become important PL/I, Algol) • They shine at connecting diverse pre- • The 70s and 80s dream expressed by Winograd (1979) existing components to accomplish new “Just as high-level languages allow the programmer to tasks escape the intricacies of the machine, higher level programming systems can provide for manipulating • Cf. shell languages in Unix complex systems. We need to shift away from algorithms • Typical properties include: and towards the description of the properties of the – privileging rapid development over execution efficiency packages that we build. Programming systems will be declarative not imperative” – implemented with interpreters rather than compilers – strong at communication with program components in • Will that dream be realised? other languages • Programming is not yet obsolete

CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 49 CMSC 331. Some material © 1998 by Addison Wesley Longman, Inc. 50

Printed with FinePrint - purchase at www.softwarelabs.com