主要程序设计语言的发展课件

上传人:cl****1 文档编号:568738569 上传时间:2024-07-26 格式:PPT 页数:66 大小:531KB
返回 下载 相关 举报
主要程序设计语言的发展课件_第1页
第1页 / 共66页
主要程序设计语言的发展课件_第2页
第2页 / 共66页
主要程序设计语言的发展课件_第3页
第3页 / 共66页
主要程序设计语言的发展课件_第4页
第4页 / 共66页
主要程序设计语言的发展课件_第5页
第5页 / 共66页
点击查看更多>>
资源描述

《主要程序设计语言的发展课件》由会员分享,可在线阅读,更多相关《主要程序设计语言的发展课件(66页珍藏版)》请在金锄头文库上搜索。

1、ISBN 0-321-49362-1 Chapter 2Chapter 2Evolution of the Major Programming Languages主要程序设计语言的发展QQ: 1920525866QQ: 19205258661主要程序设计语言的发展Chapter 2 TopicsZuses PlankalklMinimal Hardware Programming: PseudocodesThe IBM 704 and FortranFunctional Programming: LISPThe First Step Toward Sophistication: ALGOL 6

2、0Computerizing Business Records: COBOLThe Beginnings of Timesharing: BASIC2主要程序设计语言的发展Chapter 2 Topics (continued)Everything for Everybody: PL/ITwo Early Dynamic Languages: APL and SNOBOLThe Beginnings of Data Abstraction: SIMULA 67Orthogonal Design: ALGOL 68Some Early Descendants of the ALGOLsProgr

3、amming Based on Logic: PrologHistorys Largest Design Effort: Ada3主要程序设计语言的发展Chapter 2 Topics (continued)Object-Oriented Programming: SmalltalkCombining Imperative ad Object-Oriented Features: C+An Imperative-Based Object-Oriented Language: JavaScripting LanguagesA C-Based Language for the New Millen

4、nium: C#Markup/Programming Hybrid Languages4主要程序设计语言的发展Genealogy of Common Languages5主要程序设计语言的发展Zuses PlankalklDesigned in 1945, but not published until 1972Never implementedAdvanced data structuresfloating point, arrays, recordsInvariants6主要程序设计语言的发展Plankalkl SyntaxAn assignment statement to assign

5、 the expression A4 + 1 to A5 | A + 1 = A V | 4 5 (subscripts) S | 1.n 1.n (data types)7主要程序设计语言的发展Minimal Hardware Programming: PseudocodesWhat was wrong with using machine code?Poor readabilityPoor modifiabilityExpression coding was tediousMachine deficiencies-no indexing or floating point8主要程序设计语言

6、的发展Pseudocodes: Short Code Short Code developed by Mauchly in 1949 for BINAC computers Expressions were coded, left to rightExample of operations: 01 06 abs value 1n (n+2)nd power 02 ) 07 + 2n (n+2)nd root03 = 08 pause 4n if = n04 / 09 ( 58 print and tab9主要程序设计语言的发展Pseudocodes: SpeedcodingSpeedcodin

7、g developed by Backus in 1954 for IBM 701Pseudo ops for arithmetic and math functionsConditional and unconditional branchingAuto-increment registers for array accessSlow!Only 700 words left for user program10主要程序设计语言的发展Pseudocodes: Related SystemsThe UNIVAC Compiling SystemDeveloped by a team led by

8、 Grace HopperPseudocode expanded into machine codeDavid J. Wheeler (Cambridge University) developed a method of using blocks of re-locatable addresses to solve the problem of absolute addressing11主要程序设计语言的发展IBM 704 and FortranFortran 0: 1954 - not implementedFortran I:1957Designed for the new IBM 70

9、4, which had index registers and floating point hardware - This led to the idea of compiled programming languages, because there was no place to hide the cost of interpretation (no floating-point software)Environment of developmentComputers were small and unreliableApplications were scientificNo pro

10、gramming methodology or toolsMachine efficiency was the most important concern12主要程序设计语言的发展Design Process of FortranImpact 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 (for

11、business software)13主要程序设计语言的发展Fortran I OverviewFirst implemented version of FortranNames could have up to six charactersPost-test counting loop (DO)Formatted I/OUser-defined subprogramsThree-way selection statement (arithmetic IF)No data typing statements14主要程序设计语言的发展Fortran I Overview (continued)

12、First implemented version of FORTRAN No separate compilationCompiler released in April 1957, after 18 worker-years of effortPrograms larger than 400 lines rarely compiled correctly, mainly due to poor reliability of 704Code was very fastQuickly became widely used15主要程序设计语言的发展Fortran IIDistributed in

13、 1958Independent compilation(主要指子程序的单独编译)Fixed the bugs16主要程序设计语言的发展Fortran IVEvolved during 1960-62Explicit type declarationsLogical selection statementSubprogram names could be parametersANSI standard in 1966 (美国国家标准学会 )17主要程序设计语言的发展Fortran 77Became the new standard in 1978Character string handlin

14、gLogical loop control statementIF-THEN-ELSE statement18主要程序设计语言的发展Fortran 90Most significant changes from Fortran 77ModulesDynamic arraysPointersRecursionCASE statementParameter type checking19主要程序设计语言的发展Latest versions of FortranFortran 95 relatively minor additions, plus some deletionsFortran 2003

15、 dittoFortran 2008 - ditto20主要程序设计语言的发展Fortran EvaluationHighly optimizing compilers (all versions before 90)Types and storage of all variables are fixed before run timeDramatically changed forever the way computers are usedCharacterized as the lingua franca(通用语言) of the computing world21主要程序设计语言的发展

16、Functional Programming: LISPLISt Processing language Designed at MIT by McCarthyAI research needed a language toProcess data in lists (rather than arrays)Symbolic computation (rather than numeric)Only two data types: atoms and listsSyntax is based on lambda calculus(微积分,最早的举例就是微分代数表达式)22主要程序设计语言的发展R

17、epresentation of Two LISP ListsRepresenting the lists (A B C D)and (A (B C) D (E (F G)23主要程序设计语言的发展LISP EvaluationPioneered functional programmingNo need for variables or assignmentControl via recursion and conditional expressionsStill the dominant language for AICOMMON LISP and Scheme are contempor

18、ary dialects of LISPMetaLanguage, Miranda, and Haskell are related languages24主要程序设计语言的发展SchemeDeveloped at MIT in mid 1970sSmallExtensive use of static scopingFunctions as first-class entitiesSimple syntax (and small size) make it ideal for educational applications25主要程序设计语言的发展COMMON LISPAn effort

19、to combine features of several dialects of LISP into a single languageLarge, complex26主要程序设计语言的发展The First Step Toward Sophistication: ALGOL 60 (迈向成熟的第一步)Environment of developmentFORTRAN had (barely) arrived for IBM 70xMany other languages were being developed, all for specific machinesNo portable

20、language; all were machine- dependentNo universal language for communicating algorithmsALGOL 60 was the result of efforts to design a universal language27主要程序设计语言的发展Early Design ProcessACM(计算机协会) and GAMM(应用数学和力学社团) met for four days for design (May 27 to June 1, 1958)Goals of the languageClose to m

21、athematical notationGood for describing algorithmsMust be translatable to machine code28主要程序设计语言的发展ALGOL 58Concept of type was formalizedNames could be any lengthArrays could have any number of subscriptsParameters were separated by mode (in & out)Subscripts were placed in bracketsCompound statement

22、s (begin . end)Semicolon as a statement separatorAssignment operator was :=if had an else-if clauseNo I/O - “would make it machine dependent”29主要程序设计语言的发展ALGOL 58 ImplementationNot meant to be implemented, but variations of it were (MAD, JOVIAL)Although IBM was initially enthusiastic, all support wa

23、s dropped by mid 195930主要程序设计语言的发展ALGOL 60 OverviewModified ALGOL 58 at 6-day meeting in ParisNew featuresBlock structure (local scope)Two parameter passing methodsSubprogram recursionStack-dynamic arraysStill no I/O and no string handling31主要程序设计语言的发展ALGOL 60 EvaluationSuccessesIt was the standard

24、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)32主要程序设计语言的发展ALGOL 60 Evaluation (continued)FailureNever widely used, especially in U.S.ReasonsLack of I/O and the cha

25、racter set made programs non-portableToo flexible-hard to implementEntrenchment of FortranFormal syntax descriptionLack of support from IBM33主要程序设计语言的发展Computerizing Business Records: COBOLEnvironment of developmentUNIVAC was beginning to use FLOW-MATICUSAF was beginning to use AIMACOIBM was develop

26、ing COMTRAN34主要程序设计语言的发展COBOL Historical BackgroundBased on FLOW-MATICFLOW-MATIC featuresNames up to 12 characters, with embedded hyphensEnglish names for arithmetic operators (no arithmetic expressions)Data and code were completely separateThe first word in every statement was a verb35主要程序设计语言的发展CO

27、BOL Design ProcessFirst Design Meeting (Pentagon) - May 1959Design goalsMust 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 m

28、anufacturers and DoD branchesDesign Problems: arithmetic expressions? subscripts? Fights among manufacturers36主要程序设计语言的发展COBOL EvaluationContributionsFirst macro facility in a high-level languageHierarchical data structures (records)Nested selection statementsLong names (up to 30 characters), with h

29、yphensSeparate data division37主要程序设计语言的发展COBOL: DoD InfluenceFirst language required by DoDwould have failed without DoDStill the most widely used business applications language38主要程序设计语言的发展The Beginning of Timesharing: BASICDesigned by Kemeny & Kurtz at DartmouthDesign Goals:Easy to learn and use f

30、or non-science studentsMust be “pleasant and friendly”Fast turnaround for homeworkFree and private accessUser time is more important than computer timeCurrent popular dialect: Visual BASIC First widely used language with time sharing (分时性,多人使用同一台计算机) 39主要程序设计语言的发展2.8 Everything for Everybody: PL/IDe

31、signed by IBM and SHAREComputing situation in 1964 (IBMs point of view)Scientific computingIBM 1620 and 7090 computersFORTRANSHARE user groupBusiness computingIBM 1401, 7080 computersCOBOLGUIDE user group40主要程序设计语言的发展PL/I: BackgroundBy 1963 Scientific users began to need more elaborate I/O, like COB

32、OL had; business users began to need floating point and arrays for MIS It looked like many shops would begin to need two kinds of computers, languages, and support staff-too costlyThe obvious solutionBuild a new computer to do both kinds of applicationsDesign a new language to do both kinds of appli

33、cations41主要程序设计语言的发展PL/I: Design ProcessDesigned in five months by the 3 X 3 CommitteeThree members from IBM, three members from SHAREInitial conceptAn extension of Fortran IVInitially called NPL (New Programming Language)Name changed to PL/I in 196542主要程序设计语言的发展PL/I: EvaluationPL/I contributionsFir

34、st unit-level concurrencyFirst exception handlingSwitch-selectable recursionFirst pointer data typeFirst array cross sectionsConcernsMany new features were poorly designedToo large and too complex43主要程序设计语言的发展Two Early Dynamic Languages: APL and SNOBOLCharacterized by dynamic typing and dynamic stor

35、age allocationVariables are untypedA variable acquires a type when it is assigned a valueStorage is allocated to a variable when it is assigned a value44主要程序设计语言的发展APL: A Programming LanguageDesigned as a hardware description language at IBM by Ken Iverson around 1960Highly expressive (many operator

36、s, for both scalars and arrays of various dimensions)Programs are very difficult to readStill in use; minimal changes45主要程序设计语言的发展SNOBOL(String Orientated Symbolic Language)Designed as a string manipulation language at Bell Labs by Farber, Griswold, and Polensky in 1964Powerful operators for string

37、pattern matchingSlower than alternative languages (and thus no longer used for writing editors)Still used for certain text processing tasks46主要程序设计语言的发展The Beginning of Data Abstraction: SIMULA 67Designed primarily for system simulation in Norway by Nygaard and DahlBased on ALGOL 60 and SIMULA IPrim

38、ary ContributionsCoroutines - a kind of subprogramClasses, objects, and inheritance47主要程序设计语言的发展Orthogonal Design: ALGOL 68From the continued development of ALGOL 60 but not a superset of that languageSource of several new ideas (even though the language itself never achieved widespread use)Design i

39、s based on the concept of orthogonalityA few basic concepts, plus a few combining mechanisms48主要程序设计语言的发展ALGOL 68 EvaluationContributionsUser-defined data structuresReference typesDynamic arrays (called flex arrays)CommentsLess usage than ALGOL 60Had strong influence on subsequent languages, especia

40、lly Pascal, C, and Ada49主要程序设计语言的发展Pascal - 1971Developed by Wirth (a former member of the ALGOL 68 committee)Designed for teaching structured programmingSmall, simple, nothing really newLargest impact was on teaching programmingFrom mid-1970s until the late 1990s, it was the most widely used langua

41、ge for teaching programming50主要程序设计语言的发展C - 1972Designed for systems programming (at Bell Labs by Dennis Richie)Evolved primarily from BCLP, B, but also ALGOL 68Powerful set of operators, but poor type checkingInitially spread through UNIXMany areas of application51主要程序设计语言的发展Programming Based on Lo

42、gic: PrologDeveloped, by Comerauer and Roussel (University of Aix-Marseille), with help from Kowalski ( University of Edinburgh)Based on formal logicNon-proceduralCan be summarized as being an intelligent database system that uses an inferencing process to infer the truth of given queriesHighly inef

43、ficient, small application areas52主要程序设计语言的发展Historys Largest Design Effort: AdaHuge design effort, involving hundreds of people, much money, and about eight yearsStrawman requirements (April 1975)Woodman requirements (August 1975)Tinman requirements (1976)Ironman equipments (1977)Steelman requireme

44、nts (1978)Named Ada after Augusta Ada Byron, the first programmer53主要程序设计语言的发展Ada EvaluationContributionsPackages - support for data abstractionException handling - elaborate Generic program unitsConcurrency - through the tasking modelCommentsCompetitive designIncluded all that was then known about

45、software engineering and language designFirst compilers were very difficult; the first really usable compiler came nearly five years after the language design was completed54主要程序设计语言的发展Ada 95Ada 95 (began in 1988)Support for OOP through type derivation(类型派生)Better control mechanisms for shared dataN

46、ew concurrency featuresMore flexible librariesPopularity suffered because the DoD no longer requires its use but also because of popularity of C+55主要程序设计语言的发展Object-Oriented Programming: SmalltalkDeveloped at Xerox PARC, initially by Alan Kay, later by Adele GoldbergFirst full implementation of an o

47、bject-oriented language (data abstraction, inheritance, and dynamic binding)Pioneered the graphical user interface designPromoted OOP56主要程序设计语言的发展Combining Imperative and Object-Oriented Programming: C+Developed at Bell Labs by Stroustrup in 1980Evolved from C and SIMULA 67 Facilities for object-ori

48、ented programming, taken partially from SIMULA 67Provides exception handlingA large and complex language, in part because it supports both procedural and OO programmingRapidly grew in popularity, along with OOPANSI standard approved in November 1997Microsofts version (released with .NET in 2002): Ma

49、naged C+delegates, interfaces, no multiple inheritance57主要程序设计语言的发展Related OOP LanguagesEiffel (designed by Bertrand Meyer - 1992)Not directly derived from any other languageSmaller and simpler than C+, but still has most of the powerLacked popularity of C+ because many C+ enthusiasts were already C

50、 programmersDelphi (Borland)Pascal plus features to support OOPMore elegant and safer than C+58主要程序设计语言的发展An Imperative-Based Object-Oriented Language: JavaDeveloped at Sun in the early 1990sC and C+ were not satisfactory for embedded electronic devicesBased on C+Significantly simplified (does not i

51、nclude struct, union, enum, pointer arithmetic, and half of the assignment coercions of C+) Supports only OOPHas references, but not pointersIncludes support for applets and a form of concurrency59主要程序设计语言的发展Java EvaluationEliminated many unsafe features of C+Supports concurrencyLibraries for applet

52、s, GUIs, database accessPortable: Java Virtual Machine concept, JIT compilersWidely used for Web programmingUse increased faster than any previous language60主要程序设计语言的发展Scripting Languages for the WebPerlDesigned by Larry Wallfirst released in 1987Variables are statically typed but implicitly declare

53、dThree distinctive namespaces, denoted by the first character of a variables namePowerful, but somewhat dangerousGained widespread use for CGI programming on the WebAlso used for a replacement for UNIX system administration languageJavaScriptBegan at Netscape, but later became a joint venture of Net

54、scape and Sun MicrosystemsA client-side HTML-embedded scripting language, often used to create dynamic HTML documentsPurely interpretedRelated to Java only through similar syntaxPHPPHP: Hypertext Preprocessor, designed by Rasmus LerdorfA server-side HTML-embedded scripting language, often used for f

55、orm processing and database access through the WebPurely interpreted61主要程序设计语言的发展Scripting Languages for the WebPythonAn OO interpreted scripting languageType checked but dynamically typedUsed for CGI programming and form processingDynamically typed, but type checkedSupports lists, tuples, and hashe

56、sLuaAn OO interpreted scripting languageType checked but dynamically typedUsed for CGI programming and form processingDynamically typed, but type checkedSupports lists, tuples, and hashes, all with its single data structure, the tableEasily extendable62主要程序设计语言的发展Scripting Languages for the WebRubyD

57、esigned in Japan by Yukihiro Matsumoto (a.k.a, “Matz”)Began as a replacement for Perl and PythonA pure object-oriented scripting language - All data are objectsMost operators are implemented as methods, which can be redefined by user codePurely interpreted63主要程序设计语言的发展A C-Based Language for the New

58、Millennium: C#Part of the .NET development platform (2000)Based on C+ , Java, and DelphiProvides a language for component-based software developmentAll .NET languages use Common Type System (CTS), which provides a common class library64主要程序设计语言的发展Markup/Programming Hybrid LanguagesXSLTeXtensible Mar

59、kup Language (XML): a metamarkup languageeXtensible Stylesheet Language Transformation (XSTL) transforms XML documents for displayProgramming constructs (e.g., looping)JSPJava Server Pages: a collection of technologies to support dynamic Web documentsservlet: a Java program that resides on a Web ser

60、ver and is enacted when called by a requested HTML document; a servlets output is displayed by the browserJSTL includes programming constructs in the form of HTML elements65主要程序设计语言的发展SummaryDevelopment, development environment, and evaluation of a number of important programming languagesPerspective into current issues in language design66主要程序设计语言的发展

展开阅读全文
相关资源
正为您匹配相似的精品文档
相关搜索

最新文档


当前位置:首页 > 建筑/环境 > 施工组织

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号