版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
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. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025餐飲業(yè)食品添加劑使用規(guī)范管理合同2篇
- 二零二五年度大學(xué)教授學(xué)術(shù)講座與報(bào)告會(huì)合同3篇
- 2025年度出租車(chē)公司司機(jī)權(quán)益保障勞動(dòng)合同范本4篇
- 2025年度個(gè)人私有土地買(mǎi)賣(mài)合同協(xié)議書(shū)范本4篇
- 二零二五年度住宅小區(qū)車(chē)位租賃與轉(zhuǎn)租管理服務(wù)協(xié)議4篇
- 二零二四年度員工出差交通及通訊費(fèi)用報(bào)銷(xiāo)協(xié)議3篇
- 二零二五年度馬鈴薯種薯知識(shí)產(chǎn)權(quán)保護(hù)與授權(quán)合同4篇
- 二零二五版煤礦地質(zhì)勘探勞務(wù)分包服務(wù)協(xié)議4篇
- 2025年度個(gè)人與個(gè)人二手汽車(chē)買(mǎi)賣(mài)合同范本3篇
- 2025年度茶葉進(jìn)口清關(guān)代理合同范本3篇
- 機(jī)電安裝工程安全培訓(xùn)
- 洗浴部前臺(tái)收銀員崗位職責(zé)
- 2024年輔警考試公基常識(shí)300題(附解析)
- GB/T 43650-2024野生動(dòng)物及其制品DNA物種鑒定技術(shù)規(guī)程
- 暴發(fā)性心肌炎查房
- 工程質(zhì)保金返還審批單
- 【可行性報(bào)告】2023年電動(dòng)自行車(chē)項(xiàng)目可行性研究分析報(bào)告
- 五月天歌詞全集
- 商品退換貨申請(qǐng)表模板
- 實(shí)習(xí)單位鑒定表(模板)
- 數(shù)字媒體應(yīng)用技術(shù)專(zhuān)業(yè)調(diào)研方案
評(píng)論
0/150
提交評(píng)論