版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Chapter2EvolutionoftheMajorProgrammingLanguagesCopyright©2012Addison-Wesley.Allrightsreserved.1-2Chapter2TopicsZuse’sPlankalkülMinimalHardwareProgramming:PseudocodesTheIBM704andFortranFunctionalProgramming:LISPTheFirstStepTowardSophistication:ALGOL60ComputerizingBusinessRecords:COBOLTheBeginningsofTimesharing:BASICCopyright©2012Addison-Wesley.Allrightsreserved.1-3Chapter2Topics(continued)EverythingforEverybody:PL/ITwoEarlyDynamicLanguages:APLandSNOBOLTheBeginningsofDataAbstraction:SIMULA67OrthogonalDesign:ALGOL68SomeEarlyDescendantsoftheALGOLsProgrammingBasedonLogic:PrologHistory'sLargestDesignEffort:AdaCopyright©2012Addison-Wesley.Allrightsreserved.1-4Chapter2Topics(continued)Object-OrientedProgramming:SmalltalkCombiningImperativeadObject-OrientedFeatures:C++AnImperative-BasedObject-OrientedLanguage:JavaScriptingLanguagesTheFlagship.NETLanguage:C#Markup/ProgrammingHybridLanguagesCopyright©2012Addison-Wesley.Allrightsreserved.1-5GenealogyofCommonLanguagesCopyright©2012Addison-Wesley.Allrightsreserved.1-6Zuse’sPlankalkülDesignedin1945,butnotpublisheduntil1972NeverimplementedAdvanceddatastructuresfloatingpoint,arrays,recordsInvariantsCopyright©2012Addison-Wesley.Allrightsreserved.1-7PlankalkülSyntaxAnassignmentstatementtoassigntheexpressionA[4]+1toA[5]
|A+1=>AV|45(subscripts)S|1.n1.n(datatypes)Copyright©2012Addison-Wesley.Allrightsreserved.1-8MinimalHardwareProgramming:PseudocodesWhatwaswrongwithusingmachinecode?PoorreadabilityPoormodifiabilityExpressioncodingwastediousMachinedeficiencies--noindexingorfloatingpointCopyright©2012Addison-Wesley.Allrightsreserved.1-9Pseudocodes:ShortCodeShortCodedevelopedbyMauchlyin1949forBINACcomputersExpressionswerecoded,lefttorightExampleofoperations:
01–06absvalue1n(n+2)ndpower 02)07+2n(n+2)ndroot 03=08pause4nif<=n 04/09(58printandtabCopyright©2012Addison-Wesley.Allrightsreserved.1-10Pseudocodes:SpeedcodingSpeedcodingdevelopedbyBackusin1954forIBM701PseudoopsforarithmeticandmathfunctionsConditionalandunconditionalbranchingAuto-incrementregistersforarrayaccessSlow!Only700wordsleftforuserprogramCopyright©2012Addison-Wesley.Allrightsreserved.1-11Pseudocodes:RelatedSystemsTheUNIVACCompilingSystemDevelopedbyateamledbyGraceHopperPseudocodeexpandedintomachinecodeDavidJ.Wheeler(CambridgeUniversity)developedamethodofusingblocksofre-locatableaddressestosolvetheproblemofabsoluteaddressingCopyright©2012Addison-Wesley.Allrightsreserved.1-12IBM704andFortranFortran0:1954-notimplementedFortranI:1957DesignedforthenewIBM704,whichhadindexregistersandfloatingpointhardware-Thisledtotheideaofcompiledprogramminglanguages,becausetherewasnoplacetohidethecostofinterpretation(nofloating-pointsoftware)EnvironmentofdevelopmentComputersweresmallandunreliableApplicationswerescientificNoprogrammingmethodologyortoolsMachineefficiencywasthemostimportantconcernCopyright©2012Addison-Wesley.Allrightsreserved.1-13DesignProcessofFortranImpactofenvironmentondesignofFortranINoneedfordynamicstorageNeedgoodarrayhandlingandcountingloopsNostringhandling,decimalarithmetic,orpowerfulinput/output(forbusinesssoftware)Copyright©2012Addison-Wesley.Allrightsreserved.1-14FortranIOverviewFirstimplementedversionofFortranNamescouldhaveuptosixcharactersPost-testcountingloop(DO)FormattedI/OUser-definedsubprogramsThree-wayselectionstatement(arithmeticIF)NodatatypingstatementsCopyright©2012Addison-Wesley.Allrightsreserved.1-15FortranIOverview(continued)FirstimplementedversionofFORTRANNoseparatecompilationCompilerreleasedinApril1957,after18worker-yearsofeffortProgramslargerthan400linesrarelycompiledcorrectly,mainlyduetopoorreliabilityof704CodewasveryfastQuicklybecamewidelyusedCopyright©2012Addison-Wesley.Allrightsreserved.1-16FortranIIDistributedin1958IndependentcompilationFixedthebugsCopyright©2012Addison-Wesley.Allrightsreserved.1-17FortranIVEvolvedduring1960-62ExplicittypedeclarationsLogicalselectionstatementSubprogramnamescouldbeparametersANSIstandardin1966Copyright©2012Addison-Wesley.Allrightsreserved.1-18Fortran77Becamethenewstandardin1978CharacterstringhandlingLogicalloopcontrolstatementIF-THEN-ELSEstatementCopyright©2012Addison-Wesley.Allrightsreserved.1-19Fortran90MostsignificantchangesfromFortran77ModulesDynamicarraysPointersRecursionCASEstatementParametertypecheckingCopyright©2012Addison-Wesley.Allrightsreserved.1-20LatestversionsofFortranFortran95–relativelyminoradditions,plussomedeletionsFortran2003–supportforOOP,procedurepointers,interoperabilitywithCFortran2008–blocksforlocalscopes,co-arrays,DoConcurrentCopyright©2012Addison-Wesley.Allrightsreserved.1-21FortranEvaluationHighlyoptimizingcompilers(allversionsbefore90)TypesandstorageofallvariablesarefixedbeforeruntimeDramaticallychangedforeverthewaycomputersareusedCopyright©2012Addison-Wesley.Allrightsreserved.1-22FunctionalProgramming:LISPLIStProcessinglanguageDesignedatMITbyMcCarthyAIresearchneededalanguagetoProcessdatainlists(ratherthanarrays)Symboliccomputation(ratherthannumeric)Onlytwodatatypes:atomsandlistsSyntaxisbasedonlambdacalculusCopyright©2012Addison-Wesley.Allrightsreserved.1-23RepresentationofTwoLISPListsRepresentingthelists(ABCD)and(A(BC)D(E(FG)))Copyright©2012Addison-Wesley.Allrightsreserved.1-24LISPEvaluationPioneeredfunctionalprogrammingNoneedforvariablesorassignmentControlviarecursionandconditionalexpressionsStillthedominantlanguageforAICOMMONLISPandSchemearecontemporarydialectsofLISPML,Haskell,andF#arealsofunctionalprogramminglanguages,butuseverydifferentsyntaxCopyright©2012Addison-Wesley.Allrightsreserved.1-25Scheme
DevelopedatMITinmid1970sSmallExtensiveuseofstaticscopingFunctionsasfirst-classentitiesSimplesyntax(andsmallsize)makeitidealforeducationalapplicationsCopyright©2012Addison-Wesley.Allrightsreserved.1-26COMMONLISPAnefforttocombinefeaturesofseveraldialectsofLISPintoasinglelanguageLarge,complex,usedinindustryforsomelargeapplicationsCopyright©2012Addison-Wesley.Allrightsreserved.1-27TheFirstStepTowardSophistication:ALGOL60EnvironmentofdevelopmentFORTRANhad(barely)arrivedforIBM70xManyotherlanguageswerebeingdeveloped,allforspecificmachinesNoportablelanguage;allweremachine-dependentNouniversallanguageforcommunicatingalgorithmsALGOL60wastheresultofeffortstodesignauniversallanguageCopyright©2012Addison-Wesley.Allrightsreserved.1-28EarlyDesignProcessACMandGAMMmetforfourdaysfordesign(May27toJune1,1958)GoalsofthelanguageClosetomathematicalnotationGoodfordescribingalgorithmsMustbetranslatabletomachinecodeCopyright©2012Addison-Wesley.Allrightsreserved.1-29ALGOL58ConceptoftypewasformalizedNamescouldbeanylengthArrayscouldhaveanynumberofsubscriptsParameterswereseparatedbymode(in&out)SubscriptswereplacedinbracketsCompoundstatements(begin...end)SemicolonasastatementseparatorAssignmentoperatorwas:=ifhadanelse-ifclauseNoI/O-“wouldmakeitmachinedependent”Copyright©2012Addison-Wesley.Allrightsreserved.1-30ALGOL58ImplementationNotmeanttobeimplemented,butvariationsofitwere(MAD,JOVIAL)AlthoughIBMwasinitiallyenthusiastic,allsupportwasdroppedbymid1959Copyright©2012Addison-Wesley.Allrightsreserved.1-31ALGOL60OverviewModifiedALGOL58at6-daymeetinginParisNewfeaturesBlockstructure(localscope)TwoparameterpassingmethodsSubprogramrecursionStack-dynamicarraysStillnoI/OandnostringhandlingCopyright©2012Addison-Wesley.Allrightsreserved.1-32ALGOL60EvaluationSuccessesItwasthestandardwaytopublishalgorithmsforover20yearsAllsubsequentimperativelanguagesarebasedonitFirstmachine-independentlanguageFirstlanguagewhosesyntaxwasformallydefined(BNF)Copyright©2012Addison-Wesley.Allrightsreserved.1-33ALGOL60Evaluation(continued)FailureNeverwidelyused,especiallyinU.S.ReasonsLackofI/Oandthecharactersetmadeprogramsnon-portableTooflexible--hardtoimplementEntrenchmentofFortranFormalsyntaxdescriptionLackofsupportfromIBMCopyright©2012Addison-Wesley.Allrightsreserved.1-34ComputerizingBusinessRecords:COBOLEnvironmentofdevelopmentUNIVACwasbeginningtouseFLOW-MATICUSAFwasbeginningtouseAIMACOIBMwasdevelopingCOMTRANCopyright©2012Addison-Wesley.Allrightsreserved.1-35COBOLHistoricalBackgroundBasedonFLOW-MATICFLOW-MATICfeaturesNamesupto12characters,withembeddedhyphensEnglishnamesforarithmeticoperators(noarithmeticexpressions)DataandcodewerecompletelyseparateThefirstwordineverystatementwasaverbCopyright©2012Addison-Wesley.Allrightsreserved.1-36COBOLDesignProcessFirstDesignMeeting(Pentagon)-May1959DesigngoalsMustlooklikesimpleEnglishMustbeeasytouse,evenifthatmeansitwillbelesspowerfulMustbroadenthebaseofcomputerusersMustnotbebiasedbycurrentcompilerproblemsDesigncommitteememberswereallfromcomputermanufacturersandDoDbranchesDesignProblems:arithmeticexpressions?subscripts?FightsamongmanufacturersCopyright©2012Addison-Wesley.Allrightsreserved.1-37COBOLEvaluationContributionsFirstmacrofacilityinahigh-levellanguageHierarchicaldatastructures(records)NestedselectionstatementsLongnames(upto30characters),withhyphensSeparatedatadivisionCopyright©2012Addison-Wesley.Allrightsreserved.1-38COBOL:DoDInfluenceFirstlanguagerequiredbyDoDwouldhavefailedwithoutDoDStillthemostwidelyusedbusinessapplicationslanguageCopyright©2012Addison-Wesley.Allrightsreserved.1-39TheBeginningofTimesharing:BASICDesignedbyKemeny&KurtzatDartmouthDesignGoals:Easytolearnandusefornon-sciencestudentsMustbe“pleasantandfriendly”FastturnaroundforhomeworkFreeandprivateaccessUsertimeismoreimportantthancomputertimeCurrentpopulardialect:VisualBASICFirstwidelyusedlanguagewithtimesharingCopyright©2012Addison-Wesley.Allrightsreserved.1-402.8EverythingforEverybody:PL/IDesignedbyIBMandSHAREComputingsituationin1964(IBM'spointofview)ScientificcomputingIBM1620and7090computersFORTRANSHAREusergroupBusinesscomputingIBM1401,7080computersCOBOLGUIDEusergroupCopyright©2012Addison-Wesley.Allrightsreserved.1-41PL/I:BackgroundBy1963ScientificusersbegantoneedmoreelaborateI/O,likeCOBOLhad;businessusersbegantoneedfloatingpointandarraysforMISItlookedlikemanyshopswouldbegintoneedtwokindsofcomputers,languages,andsupportstaff--toocostlyTheobvioussolutionBuildanewcomputertodobothkindsofapplicationsDesignanewlanguagetodobothkindsofapplicationsCopyright©2012Addison-Wesley.Allrightsreserved.1-42PL/I:DesignProcessDesignedinfivemonthsbythe3X3CommitteeThreemembersfromIBM,threemembersfromSHAREInitialconceptAnextensionofFortranIVInitiallycalledNPL(NewProgrammingLanguage)NamechangedtoPL/Iin1965Copyright©2012Addison-Wesley.Allrightsreserved.1-43PL/I:EvaluationPL/IcontributionsFirstunit-levelconcurrencyFirstexceptionhandlingSwitch-selectablerecursionFirstpointerdatatypeFirstarraycrosssectionsConcernsManynewfeatureswerepoorlydesignedToolargeandtoocomplexCopyright©2012Addison-Wesley.Allrightsreserved.1-44TwoEarlyDynamicLanguages:APLandSNOBOLCharacterizedbydynamictypinganddynamicstorageallocationVariablesareuntypedAvariableacquiresatypewhenitisassignedavalueStorageisallocatedtoavariablewhenitisassignedavalueCopyright©2012Addison-Wesley.Allrightsreserved.1-45APL:AProgrammingLanguageDesignedasahardwaredescriptionlanguageatIBMbyKenIversonaround1960Highlyexpressive(manyoperators,forbothscalarsandarraysofvariousdimensions)ProgramsareverydifficulttoreadStillinuse;minimalchangesCopyright©2012Addison-Wesley.Allrightsreserved.1-46SNOBOLDesignedasastringmanipulationlanguageatBellLabsbyFarber,Griswold,andPolenskyin1964PowerfuloperatorsforstringpatternmatchingSlowerthanalternativelanguages(andthusnolongerusedforwritingeditors)StillusedforcertaintextprocessingtasksCopyright©2012Addison-Wesley.Allrightsreserved.1-47TheBeginningofDataAbstraction:SIMULA67DesignedprimarilyforsystemsimulationinNorwaybyNygaardandDahlBasedonALGOL60andSIMULAIPrimaryContributionsCoroutines-akindofsubprogramClasses,objects,andinheritanceCopyright©2012Addison-Wesley.Allrightsreserved.1-48OrthogonalDesign:ALGOL68FromthecontinueddevelopmentofALGOL60butnotasupersetofthatlanguageSourceofseveralnewideas(eventhoughthelanguageitselfneverachievedwidespreaduse)DesignisbasedontheconceptoforthogonalityAfewbasicconcepts,plusafewcombiningmechanismsCopyright©2012Addison-Wesley.Allrightsreserved.1-49ALGOL68EvaluationContributionsUser-defineddatastructuresReferencetypesDynamicarrays(calledflexarrays)CommentsLessusagethanALGOL60Hadstronginfluenceonsubsequentlanguages,especiallyPascal,C,andAdaCopyright©2012Addison-Wesley.Allrightsreserved.1-50Pascal-1971DevelopedbyWirth(aformermemberoftheALGOL68committee)DesignedforteachingstructuredprogrammingSmall,simple,nothingreallynewLargestimpactwasonteachingprogrammingFrommid-1970suntilthelate1990s,itwasthemostwidelyusedlanguageforteachingprogrammingCopyright©2012Addison-Wesley.Allrightsreserved.1-51C-1972Designedforsystemsprogramming(atBellLabsbyDennisRichie)EvolvedprimarilyfromBCLPandB,butalsoALGOL68Powerfulsetofoperators,butpoortypecheckingInitiallyspreadthroughUNIXThoughdesignedasasystemslanguage,ithasbeenusedinmanyapplicationareasCopyright©2012Addison-Wesley.Allrightsreserved.1-52ProgrammingBasedonLogic:PrologDeveloped,byComerauerandRoussel(UniversityofAix-Marseille),withhelpfromKowalski(UniversityofEdinburgh)BasedonformallogicNon-proceduralCanbesummarizedasbeinganintelligentdatabasesystemthatusesaninferencingprocesstoinferthetruthofgivenqueriesComparativelyinefficientFewapplicationareasCopyright©2012Addison-Wesley.Allrightsreserved.1-53History’sLargestDesignEffort:AdaHugedesigneffort,involvinghundredsofpeople,muchmoney,andabouteightyearsSequenceofrequirements(1975-1978)(Strawman,Woodman,Tinman,Ironman,Steelman)NamedAdaafterAugustaAdaByron,thefirstprogrammerCopyright©2012Addison-Wesley.Allrightsreserved.1-54AdaEvaluationContributionsPackages-supportfordataabstractionExceptionhandling-elaborateGenericprogramunitsConcurrency-throughthetaskingmodelCommentsCompetitivedesignIncludedallthatwasthenknownaboutsoftwareengineeringandlanguagedesignFirstcompilerswereverydifficult;thefirstreallyusablecompilercamenearlyfiveyearsafterthelanguagedesignwascompletedCopyright©2012Addison-Wesley.Allrightsreserved.1-55Ada95Ada95(beganin1988)SupportforOOPthroughtypederivationBettercontrolmechanismsforshareddataNewconcurrencyfeaturesMoreflexiblelibrariesAda2005InterfacesandsynchronizinginterfacesPopularitysufferedbecausetheDoDnolongerrequiresitsusebutalsobecauseofpopularityofC++Copyright©2012Addison-Wesley.Allrightsreserved.1-56Object-OrientedProgramming:SmalltalkDevelopedatXeroxPARC,initiallybyAlanKay,laterbyAdeleGoldbergFirstfullimplementationofanobject-orientedlanguage(dataabstraction,inheritance,anddynamicbinding)PioneeredthegraphicaluserinterfacedesignPromotedOOPCopyright©2012Addison-Wesley.Allrightsreserved.1-57CombiningImperativeandObject-OrientedProgramming:C++DevelopedatBellLabsbyStroustrupin1980EvolvedfromCandSIMULA67Facilitiesforobject-orientedprogramming,takenpartiallyfromSIMULA67Alargeandcomplexlanguage,inpartbecauseitsupportsbothproceduralandOOprogrammingRapidlygrewinpopularity,alongwithOOPANSIstandardapprovedinNovember1997Microsoft’sversion:MC++Properties,delegates,interfaces,nomultipleinheritanceCopyright©2012Addison-Wesley.Allrightsreserved.1-58RelatedOOPLanguagesObjective-C(designedbyBradCox–early1980s)CplussupportforOOPbasedonSmalltalkUsesSmalltalk’smethodcallingsyntaxUsedbyAppleforsystemsprogramsDelphi(Borland)PascalplusfeaturestosupportOOPMoreelegantandsaferthanC++Go(designedatGoogle-2009)LooselybasedonC,butalsoquitedifferentDoesnotsupporttraditionalOOPCopyright©2012Addison-Wesley.Allrightsreserved.1-59AnImperative-BasedObject-OrientedLanguage:JavaDevelopedatSunintheearly1990sCandC++werenotsatisfactoryforembeddedelectronicdevicesBasedonC++Significantlysimplified(doesnotincludestruct,union,enum,pointerarithmetic,andhalfoftheassignmentcoercionsofC++)SupportsonlyOOPHasreferences,butnotpointersIncludessupportforappletsandaformofconcurrencyCopyright©2012Addison-Wesley.Allrightsreserved.1-60JavaEvaluationEliminatedmanyunsafefeaturesofC++SupportsconcurrencyLibrariesforapplets,GUIs,databaseaccessPortable:JavaVirtualMachineconcept,JITcompilersWidelyusedforWebprogrammingUseincreasedfasterthananypreviouslanguageMostrecentversion,7,releasedin2011Copyright©2012Addison-Wesley.Allrightsreserved.1-61ScriptingLanguagesfortheWebPerlDesignedbyLarryWall—firstreleasedin1987VariablesarestaticallytypedbutimplicitlydeclaredThreedistinctivenamespaces,denotedbythefirstcharacterofavariable’snamePowerful,butsomewhatdangerousGainedwidespreaduseforCGIprogrammingontheWebAlsousedforareplacementforUNIXsystemadministrationlanguageJavaScriptBeganatNetscape,butlaterbecameajointventureofNetscapeandSunMicrosystemsAclient-sideHTML-embeddedscriptinglanguage,oftenusedtocreatedynamic
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2024年度户外场地租用协议模板
- 文献检索考试题目之一
- 2024年物流配送服务协议汇编
- 2024年项目融资协议范本
- 2024届安徽池州市东至二中高中毕业班阶段性测试(二)数学试题
- 2024年度房地产经纪服务协议模板
- 2024专业储藏室转让协议格式
- 2024专业房产买卖协议法律认证文件
- 2024年会计人员劳务协议样本
- 城市便捷汽车租赁协议模板2024
- 基于数据挖掘的高职学情分析与课堂教学质量提升研究
- 能源岗位招聘笔试题与参考答案(某大型国企)2024年
- 蔡戈尼效应完整版本
- 农业灌溉装置市场环境与对策分析
- 统编版道德与法治初二上学期期中试卷及答案指导(2024年)
- 部编版小学五年级上册道法课程纲要(知识清单)
- 职业技能等级认定质量控制及规章制度
- 山东省临沂市(2024年-2025年小学四年级语文)人教版期中考试(上学期)试卷及答案
- 英大传媒投资集团限公司2024年应届毕业生招聘(第一批)高频500题难、易错点模拟试题附带答案详解
- 2024人教版道法七年级上册第二单元:成长的时空大单元整体教学设计
- 肺胀(慢性阻塞性肺病)中医优势病种诊疗方案
评论
0/150
提交评论