资源描述:
《Scala for the Impatient.pdf》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ScalafortheImpatientCopyright©CayS.Horstmann2012.AllRightsReserved.TheevolutionofJavaandC++hassloweddownconsiderably,andprogrammerswhoareeagertousemoremodernlanguagefeaturesarelookingelsewhere.Scalaisanattractivechoice;infact,Ithinkitisbyfarthemostattractivechoiceforprogrammerswhow
2、anttomovebeyondJavaorC++.ScalahasaconcisesyntaxthatisrefreshingaftertheJavaboilerplate.ItrunsontheJavavirtualmachine,providingaccesstoahugesetoflibrariesandtools.Itembracesthefunctionalprogrammingstylewithoutabandoningobject-orientation,givingyouanincrementallearningpathtoanewparad
3、igm.TheScalainterpreterletsyourunquickexperiments,whichmakeslearningScalaveryenjoyable.And,lastbutnotleast,Scalaisstaticallytyped,enablingthecompilertofinderrors,sothatyoudon'twastetimefindingthemlaterinrunningprograms(orworse,don'tfindthem).Iwrotethisbookforimpatientreaderswhowant
4、tostartprogrammingwithScalarightaway.IassumeyouknowJava,C#,orC++,andIwon'tboreyouwithexplainingvariables,loops,orclasses.Iwon'texhaustivelylistallfeaturesofthelanguage,Iwon'tlectureyouaboutthesuperiorityofoneparadigmoveranother,andIwon'tmakeyousufferthroughlongandcontrivedexamples.
5、Instead,youwillgettheinformationthatyouneedincompactchunksthatyoucanreadandreviewasneeded.Scalaisabiglanguage,butyoucanuseiteffectivelywithoutknowingallofitsdetailsintimately.MartinOdersky,thecreatorofScala,hasidentifiedthefollowinglevelsofexpertiseforapplicationprogrammersandlibra
6、rydesigners:ApplicationProgrammerLibraryDesignerOverallScalaLevelBeginning(A1)BeginningIntermediate(A2)Junior(L1)IntermediateExpert(A3)Senior(L2)AdvancedExpert(L3)ExpertForeachchapter(andoccasionallyforindividualsections),Iindicatetheexperiencelevel.Thechaptersprogressthroughlevels
7、A1,L1,A2,L2,A3,L3.Evenifyoudon'twanttodesignyourownlibraries,knowingaboutthetoolsthatScalaprovidesforlibrarydesignerscanmakeyouamoreeffectivelibraryuser.IhopeyouenjoylearningScalawiththisbook.Ifyoufinderrorsorhavesuggestionsforimprovement,pleasevisithttp://horstmann.com/scalaandlea
8、veacomment.Onthatpage,youw