欢迎来到天天文库
浏览记录
ID:12489926
大小:41.59 KB
页数:10页
时间:2018-07-17
《面向对象程序设计外文翻译2》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、附录1.外文文献IntroductionToObjects1、TheprogressofabstractionAllprogramminglanguagesprovideabstractions.Itcanbearguedthatthecomplexityoftheproblemsyou’reabletosolveisdirectlyrelatedtothekindandqualityofabstraction.By“kind”Imean,“Whatisitthatyouareabstracting?”Assemblylanguageisasmallabstractionoftheu
2、nderlyingmachine.Manyso-called“imperative”languagesthatfollowed(suchasFORTRAN,BASIC,andC)wereabstractionsofassemblylanguage.Theselanguagesarebigimprovementsoverassemblylanguage,buttheirprimaryabstractionstillrequiresyoutothinkintermsofthestructureofthecomputerratherthanthestructureoftheproblemy
3、ouaretryingtosolve.Theprogrammermustestablishtheassociationbetweenthemachinemodel(inthe“solutionspace,”whichistheplacewhereyou’remodelingthatproblem,suchasacomputer)andthemodeloftheproblemthatisactuallybeingsolved(inthe“problemspace,”whichistheplacewheretheproblemexists).Theeffortrequiredtoperf
4、ormthismapping,andthefactthatitisextrinsictotheprogramminglanguage,producesprogramsthataredifficulttowriteandexpensivetomaintain,andasasideeffectcreatedtheentire“programmingmethods”industry.Thealternativetomodelingthemachineistomodeltheproblemyou’retryingtosolve.EarlylanguagessuchasLISPandAPLch
5、oseparticularviewsoftheworld(“Allproblemsareultimatelylists”or“Allproblemsarealgorithmic,”respectively).PROLOGcastsallproblemsintochainsofdecisions.Languageshavebeencreatedforconstraint-basedprogrammingandforprogrammingexclusivelybymanipulatinggraphicalsymbols.(Thelatterprovedtobetoorestrictive
6、.)Eachoftheseapproachesisagoodsolutiontotheparticularclassofproblemthey’redesignedtosolve,butwhenyoustepoutsideofthatdomaintheybecomeawkward.Theobject-orientedapproachgoesastepfurtherbyprovidingtoolsfortheprogrammertorepresentelementsintheproblemspace.Thisrepresentationisgeneralenoughthatthepro
7、grammerisnotconstrainedtoanyparticulartypeofproblem.Werefertotheelementsintheproblemspaceandtheirrepresentationsinthesolutionspaceas“objects.”(Youwillalsoneedotherobjectsthatdon’thaveproblem-spaceanalogs.)Theideaisthattheprogramis
此文档下载收益归作者所有