2 evolution of the major programming languages


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

2 evolution of the major programming languages

  1. 1. ICS 313 - Fundamentals of Programming Languages 12. Evolution of the Major Programming languagesGenealogy of Common Programming Lang.
  2. 2. ICS 313 - Fundamentals of Programming Languages 22.1 Plankalkül - 1945Never implementedAdvanced data structuresfloating point, arrays, recordsInvariantsNotation:A[7] = 5 * B[6]| 5 * B => AV | 6 7 (subscripts)S | 1.n 1.n (data types)2.2 Pseudocodes - 1949What was wrong with using machine code?Poor readabilityPoor modifiabilityExpression coding was tediousMachine deficiencies--no indexing or fl. pt.Short code; 1949; BINAC; MauchlyExpressions were coded, left to rightSome operations:1n => (n+2)nd power2n => (n+2)nd root07 => additionSpeedcoding; 1954; IBM 701, BackusPseudo ops for arithmetic and math functionsConditional and unconditional branchingAutoincrement registers for array accessSlow!Only 700 words left for user programLaning and Zierler System - 1953Implemented on the MIT Whirlwind computerFirst "algebraic" compiler systemSubscripted variables, function calls, expression translationNever ported to any other machine
  3. 3. ICS 313 - Fundamentals of Programming Languages 32.3 IBM 704 and FORTRANFORTRAN I - 1957(FORTRAN 0 - 1954 - not implemented)Designed for the new IBM 704, which had indexregisters and floating point hardwareEnvironment of development:Computers were small and unreliableApplications were scientificNo programming methodology or toolsMachine efficiency was most importantImpact of environment on design of FORTRAN INo need for dynamic storageNeed good array handling and counting loopsNo string handling, decimal arithmetic, or powerful input/output (commercial stuff)2.3 IBM 704 and FORTRAN (continued)First implemented version of FORTRANNames could have up to six charactersPosttest counting loop (DO)Formatted i/oUser-defined subprogramsThree-way selection statement (arithmetic IF)No data typing statementsNo separate compilationCompiler released in April 1957, after 18 worker/years of effortPrograms larger than 400 lines rarely compiled correctly, mainly due to poorreliability of the 704Code was very fastQuickly became widely usedFORTRAN II - 1958Independent compilationFix the bugs
  4. 4. ICS 313 - Fundamentals of Programming Languages 42.3 IBM 704 and FORTRAN (continued)FORTRAN IV - 1960-62Explicit type declarationsLogical selection statementSubprogram names could be parametersANSI standard in 1966FORTRAN 77 - 1978Character string handlingLogical loop control statementIF-THEN-ELSE statementFORTRAN 90 - 1990ModulesPointersRecursionCASE statementParameter type checkingFORTRAN EvaluationDramatically changed forever the waycomputers are used2.4 LISP - 1959LISt Processing language (Designed at MIT by McCarthy)AI research needed a language that:Process data in lists (rather than arrays)Symbolic computation (rather than numeric)Only two data types: atoms and listsSyntax is based on lambda calculusPioneered functional programmingNo need for variables or assignmentControl via recursion and conditional expressionsStill the dominant language for AICOMMON LISP and Scheme are contemporary dialects of LISPML, Miranda, and Haskell are related languages
  5. 5. ICS 313 - Fundamentals of Programming Languages 52.5 ALGOL 58 and 60Environment of development:FORTRAN had (barely) arrived for IBM 70xMany other languages were being developed, all for specificmachinesNo portable language; all were machine-dependentNo universal language for communicating algorithmsACM and GAMM met for four days for designGoals of the language:Close to mathematical notationGood for describing algorithmsMust be translatable to machine code2.5 ALGOL 58 and 60 (continued)ALGOL 58 Language Features:Concept of type was formalizedNames could have any lengthArrays could have any number of subscriptsSubscripts were placed in bracketsCompound statements (begin ... end)Semicolon as a statement separatorAssignment operator was :=if had an else-if clauseno i/o - “would make it machine dependent”Comments:Not meant to be implemented, but variations of it were (MAD, JOVIAL)Although IBM was initially enthusiastic, all support was dropped bymid-1959
  6. 6. ICS 313 - Fundamentals of Programming Languages 62.5 ALGOL 58 and 60 (continued)ALGOL 60Modified ALGOL 58 at 6-day meeting in ParisNew Features:Block structure (local scope)Two parameter passing methodsSubprogram recursionStack-dynamic arraysStill no i/o and no string handlingSuccesses:It was the standard way to publish algorithms for over 20 yearsAll subsequent imperative languages are based on itFirst machine-independent languageFirst language whose syntax was formally defined (BNF)Failure:Never widely used, especially in U.S.Reasons:No i/o and the character set made programs nonportableToo flexible--hard to implementIntrenchment of FORTRANFormal syntax descriptionLack of support of IBM2.6 COBOL - 1960Environment of development:UNIVAC was beginning to use FLOW-MATICUSAF was beginning to use AIMACOIBM was developing COMTRANBased on FLOW-MATICFLOW-MATIC features:Names up to 12 characters, with embedded hyphensEnglish names for arithmetic operators (no arithmetic expressions)Data and code were completely separateVerbs were first word in every statementFirst Design Meeting (Pentagon) - May 1959Design goals:Must look like simple EnglishMust be easy to use, even if that means it will be less powerfulMust broaden the base of computer usersMust not be biased by current compiler problemsDesign committee members were all from computer manufacturers and DoD branchesDesign Problems: arithmetic expressions? subscripts? Fights among manufacturers
  7. 7. ICS 313 - Fundamentals of Programming Languages 72.6 COBOL – 1960 (continued)Contributions:First macro facility in a high-level languageHierarchical data structures (records)Nested selection statementsLong names (up to 30 characters), with hyphensSeparate data divisionComments:First language required by DoD; would have failedwithout DoDStill the most widely used business applications language2.7 BASIC - 1964Designed by Kemeny & Kurtz at DartmouthDesign Goals:Easy to learn and use for non-science studentsMust be ”pleasant and friendly"Fast turnaround for homeworkFree and private accessUser time is more important than computer timeCurrent popular dialect: Visual BASICFirst widely used language with time sharing
  8. 8. ICS 313 - Fundamentals of Programming Languages 82.8 PL/I - 1965Designed by IBM and SHAREComputing situation in 1964 (IBMs point of view)Scientific computingIBM 1620 and 7090 computersFORTRANSHARE user groupBusiness computingIBM 1401, 7080 computersCOBOLGUIDE user groupBy 1963, however,Scientific users began to need more elaborate i/o, like COBOL had;Business users began to need fl. pt. and arrays (MIS)It looked like many shops would begin to need two kinds of computers,languages, and support staff--too costlyThe obvious solution:Build a new computer to do both kinds of applicationsDesign a new language to do both kinds of applications2.8 PL/I (continued)Designed in five months by the 3 X 3 CommitteePL/I contributions:First unit-level concurrencyFirst exception handlingSwitch-selectable recursionFirst pointer data typeFirst array cross sectionsComments:Many new features were poorly designedToo large and too complexWas (and still is) actually used for bothscientific and business applications
  9. 9. ICS 313 - Fundamentals of Programming Languages 92.9 APL and SNOBOLCharacterized by dynamic typing and dynamic storageallocationAPL (A Programming Language) 1962Designed as a hardware description language (at IBM by KenIverson)Highly expressive (many operators, for both scalars and arraysof various dimensions)Programs are very difficult to readSNOBOL(1964)Designed as a string manipulation language (at Bell Labs byFarber, Griswold, and Polensky)Powerful operators for string pattern matching2.10 SIMULA 67 - 1967Designed primarily for system simulation(in Norway by Nygaard and Dahl)Based on ALGOL 60 and SIMULA IPrimary Contribution:Coroutines - a kind of subprogramImplemented in a structure called a classClasses are the basis for data abstractionClasses are structures that include both local data andfunctionalityObjects and inheritance
  10. 10. ICS 313 - Fundamentals of Programming Languages 102.11 ALGOL 68 - 1968From the continued development of ALGOL 60, but it is not asuperset of that languageDesign is based on the concept of orthogonalityContributions:User-defined data structuresReference typesDynamic arrays (called flex arrays)Comments:Had even less usage than ALGOL 60Had strong influence on subsequent languages, especiallyPascal, C, and Ada2.12 Important ALGOL DescendantsPascal - 1971Designed by Wirth, who quit the ALGOL 68 committee (didntlike the direction of that work)Designed for teaching structured programmingSmall, simple, nothing really newFrom mid-1970s until the late 1990s, it was the most widelyused language for teaching programming in collegesC - 1972Designed for systems programming (at Bell Labs by DennisRichie)Evolved primarily from B, but also ALGOL 68Powerful set of operators, but poor type checkingInitially spread through UNIX
  11. 11. ICS 313 - Fundamentals of Programming Languages 112.12 Important ALGOL Descendants (co.)Modula-2 mid-1970s (Wirth)Pascal plus modules and some low-level features designed forsystems programmingModula-3 -late 1980s (Digital & Olivetti)Modula-2 plus classes, exception handling, garbage collection, andconcurrencyOberon - late 1980s (Wirth)Adds support for OOP to Modula-2Many Modula-2 features were deleted (e.g., for statement,enumeration types, with statement, noninteger array indices)Delphi (Borland)Pascal plus features to support OOPMore elegant and safer than C++2.13 Prolog - 1972Developed at the University of Aix-Marseille, byComerauer and Roussel, with some help fromKowalski at the University of EdinburghBased on formal logicNon-proceduralCan be summarized as being an intelligent databasesystem that uses an inferencing process to infer thetruth of given queries
  12. 12. ICS 313 - Fundamentals of Programming Languages 122.14 Ada - 1983 (began in mid-1970s)Huge design effort, involving hundreds of people, much money, and about eight yearsEnvironment: More than 450 different languages being used for DOD embedded systems(no software reuse and no development tools)Contributions:Packages - support for data abstractionException handling - elaborateGeneric program unitsConcurrency - through the tasking modelComments:Competitive designIncluded all that was then known about software engineering and language designFirst compilers were very difficult; the first really usable compiler came nearly five years after thelanguage design was completedAda 95 (began in 1988)Support for OOP through type derivationBetter control mechanisms for shared data (new concurrency features)More flexible libraries2.15 Smalltalk - 1972-1980Developed at Xerox PARC, initially by Alan Kay,laterby Adele GoldbergFirst full implementation of an object-orientedlanguage (data abstraction, inheritance, anddynamic type binding)Pioneered the graphical user interface everyonenow uses
  13. 13. ICS 313 - Fundamentals of Programming Languages 132.16 C++ - 1985Developed at Bell Labs by StroustrupEvolved from C and SIMULA 67Facilities for object-oriented programming, taken partially from SIMULA 67, wereadded to CAlso has exception handlingA large and complex language, in part because it supports both procedural andOO programmingRapidly grew in popularity, along with OOPANSI standard approved in November, 1997Eiffel - a related language that supports OOP(Designed by Bertrand Meyer - 1992)Not directly derived from any other languageSmaller and simpler than C++, but still has most of the power2.17 Java (1995)Developed at Sun in the early 1990sBased on C++Significantly simplified (does not include struct, union, enum,pointer arithmetic, and half of the assignment coercions ofC++)Supports only OOPHas references, but not pointersIncludes support for applets and a form of concurrency