您好,欢迎访问三七文档
当前位置:首页 > 办公文档 > 其它办公文档 > JavaScript大学毕业论文外文文献翻译及原文
毕业设计(论文)外文文献翻译文献、资料中文题目:JavaScript文献、资料英文题目:JavaScript文献、资料来源:文献、资料发表(出版)日期:院(部):专业:班级:姓名:学号:指导教师:翻译日期:2017.02.14JavaScriptWhenIwasayoungjourneymanprogrammer,IwouldlearnabouteveryfeatureofthelanguagesIwasusing,andIwouldattempttouseallofthosefeatureswhenIwrote.Isupposeitwasawayofshowingoff,andIsupposeitworkedbecauseIwastheguyyouwenttoifyouwantedtoknowhowtouseaparticularfeature.EventuallyIfiguredoutthatsomeofthosefeaturesweremoretroublethantheywereworth.Someofthemwerepoorlyspecified,andsoweremorelikelytocauseportabilityproblems.Someresultedincodethatwasdifficulttoreadormodify.Someinducedmetowriteinamannerthatwastootrickyanderror-prone.Andsomeofthosefeaturesweredesignerrors.Sometimeslanguagedesignersmakemistakes.Mostprogramminglanguagescontaingoodpartsandbadparts.IdiscoveredthatIcouldbeabetterprogrammerbyusingonlythegoodpartsandavoidingthebadparts.Afterall,howcanyoubuildsomethinggoodoutofbadparts?Itisrarelypossibleforstandardscommitteestoremoveimperfectionsfromalanguagebecausedoingsowouldcausethebreakageofallofthebadprogramsthatdependonthosebadparts.Theyareusuallypowerlesstodoanythingexceptheapmorefeaturesontopoftheexistingpileofimperfections.Andthenewfeaturesdonotalwaysinteractharmoniously,thusproducingmorebadparts.Butyouhavethepowertodefineyourownsubset.Youcanwritebetterprogramsbyrelyingexclusivelyonthegoodparts.JavaScriptisalanguagewithmorethanitsshareofbadparts.Itwentfromnon-existencetoglobaladoptioninanalarminglyshortperiodoftime.Itneverhadanintervalinthelabwhenitcouldbetriedoutandpolished.ItwentstraightintoNetscapeNavigator2justasitwas,anditwasveryrough.WhenJava™appletsfailed,JavaScriptbecametheLanguageoftheWebbydefault.JavaScript'spopularityisalmostcompletelyindependentofitsqualitiesasaprogramminglanguage.Fortunately,JavaScripthassomeextraordinarilygoodparts.InJavaScript,thereisabeautiful,elegant,highlyexpressivelanguagethatisburiedunderasteamingpileofgoodintentionsandblunders.ThebestnatureofJavaScriptissoeffectivelyhiddenthatformanyyearstheprevailingopinionofJavaScriptwasthatitwasanunsightly,incompetenttoy.MyintentionhereistoexposethegoodnessinJavaScript,anoutstanding,dynamicprogramminglanguage.JavaScriptisablockofmarble,andIchipawaythefeaturesthatarenotbeautifuluntilthelanguage'struenaturerevealsitself.IbelievethattheelegantsubsetIcarvedoutisvastlysuperiortothelanguageasawhole,beingmorereliable,readable,andmaintainable.Thisbookwillnotattempttofullydescribethelanguage.Instead,itwillfocusonthegoodpartswithoccasionalwarningstoavoidthebad.Thesubsetthatwillbedescribedherecanbeusedtoconstructreliable,readableprogramssmallandlarge.Byfocusingonjustthegoodparts,wecanreducelearningtime,increaserobustness,andsavesometrees.Perhapsthegreatestbenefitofstudyingthegoodpartsisthatyoucanavoidtheneedtounlearnthebadparts.Unlearningbadpatternsisverydifficult.Itisapainfultaskthatmostofusfacewithextremereluctance.Sometimeslanguagesaresubsettedtomakethemworkbetterforstudents.Butinthiscase,IamsubsettingJavaScripttomakeitworkbetterforprofessionals.WhyJavaScript?JavaScriptisanimportantlanguagebecauseitisthelanguageofthewebbrowser.Itsassociationwiththebrowsermakesitoneofthemostpopularprogramminglanguagesintheworld.Atthesametime,itisoneofthemostdespisedprogramminglanguagesintheworld.TheAPIofthebrowser,theDocumentObjectModel(DOM)isquiteawful,andJavaScriptisunfairlyblamed.TheDOMwouldbepainfultoworkwithinanylanguage.TheDOMispoorlyspecifiedandinconsistentlyimplemented.ThisbooktouchesonlyverylightlyontheDOM.IthinkwritingaGoodPartsbookabouttheDOMwouldbeextremelychallenging.JavaScriptismostdespisedbecauseitisn'tSOMEOTHERLANGUAGE.IfyouaregoodinSOMEOTHERLANGUAGEandyouhavetoprograminanenvironmentthatonlysupportsJavaScript,thenyouareforcedtouseJavaScript,andthatisannoying.Mostpeopleinthatsituationdon'tevenbothertolearnJavaScriptfirst,andthentheyaresurprisedwhenJavaScriptturnsouttohavesignificantdifferencesfromtheSOMEOTHERLANGUAGEtheywouldratherbeusing,andthatthosedifferencesmatter.TheamazingthingaboutJavaScriptisthatitispossibletogetworkdonewithitwithoutknowingmuchaboutthelanguage,orevenknowingmuchaboutprogramming.Itisalanguagewithenormousexpressivepower.Itisevenbetterwhenyouknowwhatyou'redoing.Programmingisdifficultbusiness.Itshouldneverbeundertakeninignorance.AnalyzingJavaScriptJavaScriptisbuiltonsomeverygoodideasandafewverybadones.Theverygoodideasincludefunctions,loosetyping,dynamicobjects,andanexpressiveobjectliteralnotation.Thebadideasincludeaprogrammingmodelbasedonglobalvariables.JavaScript'sfunctionsarefirstclassobjectswith(mostly)lexicalscoping.JavaScriptisthefirstlambdalanguagetogomainstream.Deepdown,JavaScripthasmoreincommonwithLispandSchemethanwithJava.ItisLispinC'sclothing.ThismakesJavaScriptaremarkablypowerfullanguage.Thefashioninmostprogramminglanguagestodaydemandsstrongtyping.Thetheoryisthatstrongtypingallowsacompilertodetectalargeclassoferrorsatcompiletime.Thesoonerwecandetectandrepairerrors,thelesstheycostus.JavaScriptisalooselytypedlanguage,soJavaScriptcompilersareunabletodetecttypeerrors.Thiscanbealarmingtopeoplewhoarecom
本文标题:JavaScript大学毕业论文外文文献翻译及原文
链接地址:https://www.777doc.com/doc-4337157 .html