programming language
History
Therearemanylanguagesusedforspecialpurposes,whichareonlyusedinspecialsituations.Forexample,PHPisspecificallyusedtodisplaywebpages;Perlismoresuitablefortextprocessing;Clanguageiswidelyusedinthedevelopmentofoperatingsystemsandcompilers(so-calledsystemprogramming).
Theemergenceofhigh-levelprogramminglanguages(alsoknownashigh-levellanguages)makescomputerprogramminglanguagesnolongerrelyexcessivelyonaparticularmachineorenvironment.Thisisbecausehigh-levellanguageswillbecompiledintodifferentmachinelanguagesondifferentplatformsinsteadofbeingexecuteddirectlybythemachine.OneofthemaingoalsofFORTRAN,oneoftheearliestprogramminglanguages,istoachieveplatformindependence.
Interpretation
Althoughmostlanguagescanbecompiled(Compiled)andcanbeinterpreted(interpreted),butmostcanonlyrunwellinonesituation.Insomeprogrammingsystems,theprogramhastogothroughseveralstagesofcompilation.Generallyspeaking,thelatterstageofcompilationtendstobeclosertomachinelanguage.ThiscommonlyusedtechniquewasfirstusedinBCPLinthelate1960s.Thecompilerfirstcompilesarepresentationcalled"0code",andthenusesavirtualizertoconvertittorealcodethatcanrunonthemachine.ThissuccessfultechniquewaslaterusedinPascalandP-code,aswellasSmalltalkandbinarycode,althoughinmanycases,thecodeusedinthemiddleofthe
programdesignlanguage(24photos)
isoftenItisinterpreted,notcompiled.Ifthetranslationmechanismusedistotranslatetheprogramcodetobetranslatedasawhole,andthenruntheinternalformat,thenthistranslationprocessiscalledcompilation.Therefore,acompilerisaprogramthattakesreadableprogramtext(calledsourcecode)asinputdata,andthenoutputsanexecutablefile(objectcode).Theoutputexecutablefilecanbemachinelanguage,directlyrunbythecentralprocessingunitofthecomputer,orabinarycodeofacertainsimulator.
Iftheprogramcodeistranslatedimmediatelyatruntime,thenthistranslationmechanismiscalledinterpretation.Interpretedprogramstendtorunslowerthancompiledprograms,buttheytendtobemoreflexiblebecausetheycaninteractwiththeexecutionenvironment.
Ingredients
Thetypesoflanguagesvarygreatly.However,generallyspeaking,therearenomorethanfourbasicingredients.
Datacomponents.Usedtodescribethedatainvolvedintheprogram.
Operationalcomponents.Usedtodescribetheoperationsincludedintheprogram.
Controlingredients.Usedtoexpressthecontrolstructureintheprogram.
Transferingredients.Usedtoexpressthetransmissionofdataintheprogram.
Featuresofprogramminglanguage
Programminglanguagehasfeaturessuchaspsychologicalengineeringandtechnology.
(1)Psychologicalcharacteristics:ambiguity,conciseness,locality,order,andtradition.
(2)Engineeringfeatures:portability,availabilityofdevelopmenttools,reusabilityandmaintainabilityofsoftware.
(3)Technicalfeatures:Languagesthatsupportstructuredconstructionhelpreducethecomplexityoftheprogramloop,makingtheprogrameasytotestandmaintain.
Classification
Sincethe1960s,therehavebeenthousandsofprogramminglanguagespublishedintheworld,butonlyasmallpartofthemhavebeenwidelyused.Fromtheperspectiveofthedevelopmentprocess,programminglanguagescanbedividedinto4generations.
Thefirstgenerationofmachinelanguage
Machinelanguageiscomposedofbinary0and1codeinstructions.DifferentCPUshavedifferentinstructionsystems.Machinelanguageprogramsaredifficulttowrite,modify,andmaintain,requiringuserstodirectlyallocatestoragespace,andprogrammingefficiencyisextremelylow.Thislanguagehasbeengraduallyeliminated.
Thesecond-generationassemblylanguage
Assemblylanguageinstructionsarethesymbolizationofmachineinstructions,andthereisadirectcorrespondencewithmachineinstructions.Therefore,assemblylanguageisalsodifficulttolearnanduse.Shortcomingssuchaserror-proneanddifficultmaintenance.Butassemblylanguagealsohasitsownadvantages:itcandirectlyaccessthesysteminterface,andthemachinelanguageprogramtranslatedintotheassemblyprogramishighlyefficient.Fromtheperspectiveofsoftwareengineering,assemblylanguageisusedonlywhenthehigh-levellanguagecannotmeetthedesignrequirementsordoesnothavethetechnicalperformancetosupportacertainspecificfunction(suchasspecialinputandoutput).
Thethird-generationhigh-levellanguage
Thehigh-levellanguageisauser-orientedlanguagethatisbasicallyindependentofthetypeandstructureofthecomputer.Itsbiggestadvantageis:theformisclosetoarithmeticlanguageandnaturallanguage,andtheconceptisclosetotheconceptsthatpeopleusuallyuse.Onecommandofhigh-levellanguagecanreplaceseveral,dozensorevenhundredsofassemblylanguageinstructions.Therefore,high-levellanguagesareeasytolearnanduse,havestrongversatility,andarewidelyused.Therearemanytypesofhigh-levellanguages,whichcanbefurtherclassifiedfromtwoaspects:applicationcharacteristicsanddescriptionsofobjectivesystems.1.ClassificationfromtheperspectiveofapplicationFromtheperspectiveofapplication,high-levellanguagescanbedividedintobasiclanguages,structuredlanguages,andspecializedlanguages.(1)BasiclanguageBasiclanguageisalsocalleduniversallanguage.Ithasalonghistory,iswidelyspread,hasalargenumberofdevelopedsoftwarelibraries,hasalargenumberofusers,andisfamiliarandacceptedbypeople.ThelanguagesthatbelongtothiscategoryareFORTRAN,COBOL,BASIC,ALGOL,etc.TheFORTRANlanguageisahigh-levellanguagethatiswidelypopularintheworldandisalsothefirsttobeused.Sincethe1990s,ithasalwaysoccupiedanimportantpositioninengineeringandscientificcomputingandhasbeenwelcomedbyscientificandtechnologicalpersonnel.BASIClanguageisaninteractivelanguagedevelopedintheearly1960stoadapttothetime-sharingsystem,whichcanbeusedforgeneralnumericalcalculationandtransactionprocessing.TheBASIClanguagehasasimplestructure,iseasytolearnanduse,andhasinteractivecapabilities.Ithasbecomeanintroductorylanguageformanybeginnerstolearnprogramming.(2)StructuredlanguageSincethe1970s,theideasofstructuredprogrammingandsoftwareengineeringhavebeenincreasinglyacceptedandappreciatedbypeople.Undertheirinfluence,someveryinfluentialstructuredlanguageshaveappearedsuccessively.Thesestructuredlanguagesdirectlysupportstructuredcontrolstructuresandhavestrongprocessstructureanddatastructurecapabilities.PASCAL,C,andAdalanguagesaretheirprominentrepresentatives.PASCALlanguageisthefirstmodernhigh-levellanguagethatsystematicallyembodiestheconceptofstructuredprogramming.Theoriginalgoalofsoftwaredevelopmentistouseitasateachingtoolforstructuredprogramming.Becauseofitsclearmodules,completecontrolstructure,richdatatypesanddatastructures,stronglanguageexpressionability,andeasytransplantation,ithasnotonlybeendesignatedastheteachinglanguagebymanyuniversitiesathomeandabroad,butalsousedinscientificcomputing,dataprocessingandsystemsoftwaredevelopment.Ithasawiderrangeofapplications.TheClanguagehasrichfunctions,strongexpressionability,richoperatorsanddatatypes,flexibleandconvenientuse,wideapplication,strongtransplantationability,highcompilationquality,hightargetprogramefficiency,andhastheadvantagesofhigh-levellanguage.Atthesametime,Clanguagealsohasmanyfeaturesoflow-levellanguages,suchasallowingdirectaccesstophysicaladdresses,bitoperations,mostfunctionsofassemblylanguage,anddirecthardwareoperations.ThequalityoftheobjectprogramproducedbytheClanguagecompilercanbecomparabletothatoftheobjectprogramproducedbyassemblylanguage.Ithasthereputationof"portableassemblylanguage"andhasbecomeoneoftheimportantlanguagesforwritingapplicationsoftware,operatingsystemsandcompilers.(3)Dedicatedlanguageisalanguagespeciallydesignedforaparticularapplication,usuallywithaspecialgrammaticalform.Generallyspeaking,thislanguagehasanarrowapplicationrange,anditsportabilityandmaintainabilityarenotasgoodasstructuredprogramminglanguages.Withthedevelopmentoftime,hundredsofprofessionallanguageshavebeenused,andthemorewidelyusedlanguagesareAPL,Forth,andLISP.Second,classificationfromthedescriptionofobjectivesystemsFromtheperspectiveofdescribingobjectivesystems,programminglanguagescanbedividedintoprocess-orientedlanguagesandobject-orientedlanguages.(1)Process-orientedlanguageisaprogramminglanguagecomposedof"datastructure+algorithm"programmingparadigm,calledprocess-orientedlanguage.Mostoftheprogramminglanguagesintroducedaboveareprocess-orientedlanguages.(2)Object-orientedlanguageisaprogramminglanguagecomposedof"object+message"programmingparadigm,calledobject-orientedlanguage.Themorepopularobject-orientedlanguagesareDelphi,VisualBasic,Java,C++andsoon.Delphilanguagehasavisualdevelopmentenvironment,providesobject-orientedprogrammingmethods,andcandesignvariousapplicationswithWindowsfeatures(suchasdatabaseapplicationsystems,communicationsoftwareandthree-dimensionalvirtualreality,etc.),andcanalsodevelopmultimediaapplicationsystems.VisualBasiclanguageisabbreviatedasVB,whichisadevelopmentenvironmentandtoolsfordevelopingapplications.Ithasaverygoodgraphicaluserinterface,adoptsnewobject-orientedandevent-drivenmechanisms,andintegratesproceduralandstructuredprogramming.Itisagraphicalconceptioninapplicationdevelopment,withoutwritinganyprogram,youcaneasilycreateanapplicationprograminterface,anditisverysimilarorevenconsistentwiththeWindowsinterface.TheJavalanguageisanobject-orientedprogramminglanguagethatdoesnotdependonaspecificplatform.Itissimple,reliable,compilable,extensible,multi-threaded,structure-neutral,typedisplaydescription,dynamicstoragemanagement,andeasytounderstand.ItisanidealAprogramminglanguageusedtodevelopInternetapplicationsoftware.
Thefourthgenerationofnon-procedurallanguage
4GLisanon-procedurallanguage.Whencoding,only"whattodo"needstobestated,withouttheneedtodescribethedetailsofthealgorithm.Databasequeryandapplicationgeneratoraretwotypicalapplicationsof4GL.Userscanusedatabasequerylanguage(SQL)toperformcomplexoperationsontheinformationinthedatabase.TheuseronlyneedstotellSQLwherethecontenttobesearchedislocatedandwhatrootconditionsareusedtosearchfor,andSQLwillautomaticallycompletethesearchprocess.Theapplicationgeneratorisahigh-levellanguageprogramthat"automaticallygenerates"tomeettheneedsofusers.Itshouldbesaidthattherealfourth-generationprogramminglanguagehasnotyetappeared.Theso-calledfourth-generationlanguagesmostlyrefertosoftwaretoolproductswith4GLfeaturesbasedonacertainlanguageenvironment,suchasSystemZ,suchasPowerBuilder,FOCUS,andsoon.Thefourth-generationprogramminglanguageisanapplication-orientedprogramminglanguagedesignedforendusers.Ithastheadvantagesofshorteningtheapplicationdevelopmentprocess,reducingmaintenancecosts,minimizingproblemsinthedebuggingprocess,andbeinguser-friendly.
Mainlanguage
LanguageistheChineseversionofClanguage
OlanguageOlanguageisoneAChinesecomputerlanguage(orpackage:Oassemblylanguage,Ointermediatelanguage,Ohigh-levellanguage)
APT(AutomaticallyPro-grammedTools)-automaticnumericalcontrolprogram.Thefirstspeciallanguage,usedforCNCmachining,1956.
FORTRAN(FORmulaTRANslation)-formulatranslationprogramminglanguage.Thefirstwidelyusedhigh-levellanguagecreatedconditionsfortheuseofcomputersbyscientificandengineeringtechnicians,1956.
FLOW-MATIC.Thefirstlanguagesuitableforcommercialdataprocessing,itsgrammarissimilartoEnglishgrammar,1956.
IPL-V(InformationProcessingLanguageV)-informationprocessinglanguage.Thefirsttableprocessinglanguagecanberegardedasanassemblylanguageonahypotheticalcomputersuitablefortableprocessing,1958.
COMIT(COmpilerMassachusettsInstitutefoTechnology)-MassachusettsInstituteofTechnologycompilerprogram.Thefirstrealisticstringprocessingandpatternmatchinglanguage,1957.
COBOL(COmmonBusinessOrientedLanguage)-acommonbusiness-orientedlanguage.Themostwidelyusedcommerciallanguage,itisahigh-levelprogramminglanguagesuitablefordataprocessing,1960.
ALGOL60(ALGOrithmiclanguage60)-Algorithmlanguage60.Itisanimportantsymbolofprogramminglanguagetoshiftfromtechniquetoscience,whichischaracterizedbylocality,dynamicity,recursionandrigor,1960.
Listprocessinglanguage(LIStProceessing——LISP.Introducedtheconceptoffunctionalprogrammingandtableprocessingfacilities,widelyusedinthefieldofartificialintelligence,1960.
JOVIAL(JulesOwnVersionofIAL)-theJulestextoftheinternationalalgorithmlanguage.Thefirstlanguagewithcomprehensivefunctionssuchasprocessingscientificcalculations,input-outputlogicinformation,datastorageandprocessing.MostJOVIALcompilersarewritteninJOVIAL,1960.
GPSS(General-purposeSystemsSimulator)-ageneral-purposesystemsimulationlanguage.Thefirstlanguagetomakesimulationapracticaltool,1961.
JOSS(JohnniacOpen-ShopSystem-.Thefirstinteractivelanguage,ithasmanydialects,oncemadetime-sharingpractical,1964.
FORMAC(FORmulaMAnipulationCompiler)-formulatranslationprogramminglanguageformulaprocessingcompiler.Thefirstlanguagewidelyusedinthefieldofmathematicalproblemsrequiringformalalgebraprocessing,1964.
SIMULA(SIMUlationLAnguage)——simulationlanguage.Mainlyusedforsimulationlanguage,itisanextensionofALGOL60,1966.SIMULA67isanimprovementofSIMULAin1967.Theintroduced"class"conceptismodernprogrammingTheprecursoroftheconceptof"module"inthelanguage.
APL/360(AProgrammingLanguage)-programminglanguage360.Alanguagethatprovidesmanyadvancedoperators,Enableprogrammerstowriteverycompactprograms,especiallythoseinvolvingmatrixcalculations,1967.
PASCAL(PhilipsAutomaticSequenceCALcul-ator)——PhilipsAutomaticsequentialcomputerlanguage.AnimportantlanguagedevelopedonthebasisofALGOL60.Itsgreatestfeatureisconcisenessandstructure,1971.
PROLOG(PROgramminginLOGic).Onekind.Alanguagefordealingwithlogicalproblems.Ithasbeenwidelyusedinrelationaldatabases,mathematicallogic,abstractproblemsolving,naturallanguageunderstandingandotherfields,1973.
ADA.Amodernmodularlanguage.ItbelongstotheALGOLPASCALlanguagefamily,buthasmajorchanges.Itsmaincharacteristicsarestrongtypingandmodularization,easytoachieveindividualcompilation,providegenericfacilities,provideexceptionhandling,suitableforembeddedapplications,1979.
Python'sbeststringprocessingscriptinglanguage.
perlisascriptinglanguagewidelyusedinunix/linuxsystemmanagement.
RubyisadynamiclanguagedesignedbytheJapanesethatiswidelystudiedandused.
TheclassicCstructuredprogramminglanguage,itcanaccomplisheverythingyouwant.
C++buildslarge-scalesoftware,requiresspeedandperformance,youcanuseit.
Anobject-orientedlanguagebasedonJVMvirtualmachinedevelopedbyJAVASUNiswidelyusedinmobiledevices.
Thechoiceofprogramminglanguage
Thecharacteristicsofprogramminglanguagearedifferent,andtheapplicablefieldsarealsodifferent.Thefollowingintroducestheselectionmethodfromdifferentangles.
1.Applicationfieldsoftheproject
(1)Scientificengineeringcalculation.Alargenumberofstandardlibraryfunctionsareneededtohandlecomplexnumericalcalculations.LanguagesavailableforselectionincludeFORTRANlanguage,Clanguage,etc.
(2)Dataprocessinganddatabaseapplication.SQLisadatabasequerylanguagedevelopedbyIBM,and4GLiscalledthe4thgenerationlanguage.
(3)Real-timeprocessing.Real-timeprocessingsoftwaregenerallyhashighperformancerequirements,andtheavailablelanguagesincludeassemblylanguageandAdalanguage.
(4)Systemsoftware.Whenwritingsystemsoftwaresuchasoperatingsystemandcompilationsystem,youcanchooseassemblylanguage,Clanguage,PascallanguageandAdalanguage.
(5)Artificialintelligence.Ifyouwanttocompletesystemsinthefieldofartificialintelligencesuchasknowledgebasesystems,expertsystems,decisionsupportsystems,reasoningengineering,languagerecognition,andpatternrecognition,youshouldchoosePrologandLisplanguages.
2.Themethodofsoftwaredevelopment
Sometimesthechoiceofprogramminglanguagedependsonthemethodofdevelopment.Ifyouwanttodevelopwitharapidprototypemodel,youmustbeabletoquicklyRealizetheprototype,so4GLshouldbeused.Ifitisanobject-orientedmethod,anobject-orientedlanguageprogrammingshouldbeused.
3.Softwareexecutionenvironment
Agoodprogrammingenvironmentcannotonlyeffectivelyimprovesoftwareproductivity,butalsoreduceerrorsandeffectivelyimprovesoftwarequality.
4.Thecomplexityofalgorithmsanddatastructures
Theproblemalgorithmsinthefieldsofscientificcomputing,real-timeprocessingandartificialintelligencearemorecomplex,whiledataprocessing,Problemsinthefieldofdatabaseapplications,systemsoftware,anddatastructures.Itismorecomplicated,soyoucanconsiderwhetheryouhavetheabilitytocompletecomplexalgorithmsortheabilitytoconstructcomplexdatastructureswhenchoosingalanguage.
5.Softwaredeveloper’sknowledge
Thechoiceofwritinglanguageisrelatedtothesoftwaredeveloper’sknowledgelevelandpsychologicalfactors,andthedevelopershouldcarefullyanalyzeThetypeofsoftwareproject,daretolearnnewknowledgeandmasternewtechnology.
DataModel
Theinternaldataofmoderncomputersareonlystoredinabinaryway,thatis,on-offmode.Variousdatarepresentinginformationintherealworld,suchasnames,bankaccountnumbers,metrics,andthesamelow-endbinarydata,areallorganizedthroughprogramminglanguagesandbecomehigh-endconcepts.
Thesystemthatspecializesinprocessingdatainaprogramiscalledthetypesystemoftheprogramminglanguage;theresearchanddesignofthetypesystemiscalledtypetheory.Languagescanbedividedintostaticallytypedsystems,suchasC++andJava,anddynamicallytypedsystems,suchasLisp,JavaScript,Tcl,andProlog.Theformercanbefurtherdividedintolanguagesthatcontainmanifesttypes,thatis,thetypesofeachvariableandfunctionareclearlydeclared,ortype-inferredlanguages(suchasMUMPS,ML).
Mostlanguagescanalsocombinecomplexdatastructuretypes(usingarrays,lists,stacks,files,etc.)onthebasisofbuilt-intypes.ObjectOrientedLanguage(ObjectOrientedLanguage,alsotranslatedas"ObjectOrientedLanguage")allowsprogrammerstodefinenewdatatypes,namely"objects"or"objects",aswellasfunctionsandmethodsthatrunontheobjects(Methods).
Inadditiontowhenandhowtodeterminetherelationshipbetweenexpressionsandtypes,anotherimportantquestioniswhichtypesaredefinedbythelanguageandwhichtypesareallowedasexpressionvalues.Low-endlanguagessuchastheCprogramminglanguageallowprogramstonamememorylocations,memoryregions,andcompile-timeconstants;ANSICevenallowsexpressionstoreturnstructvalues.Functionallanguagesgenerallyallowvariablestodirectlyusethevaluecalculatedatruntime,insteadofpointingoutthememoryaddresswherethevaluemaybestored.
Developmenttrend
Programdesignlanguageisanimportantaspectofsoftware.Itsdevelopmenttrendismodularization,simplicityandformalization.
Modularity.Notonlythelanguagehasmodularcomponents,theprogramiscomposedofmodules,butthestructureofthelanguageitselfisalsomodular.
Conciseness.Therearenotmanybasicconceptsinvolved,theingredientsaresimple,thestructureisclear,anditiseasytolearnanduse.
Formalize.Developanappropriateformalsystemtodescribethegrammar,semantics,andpragmaticsofthelanguage.
Latest: Printing plate