图书介绍
Scala编程 第2版 英文PDF|Epub|txt|kindle电子书版本网盘下载
![Scala编程 第2版 英文](https://www.shukui.net/cover/66/32315992.jpg)
- (美)万普勒,(美)佩恩著 著
- 出版社: 南京:东南大学出版社
- ISBN:9787564159221
- 出版时间:2015
- 标注页数:558页
- 文件大小:154MB
- 文件页数:585页
- 主题词:JAVA语言-程序设计-英文
PDF下载
下载说明
Scala编程 第2版 英文PDF格式电子书版下载
下载的文件为RAR压缩包。需要使用解压软件进行解压得到PDF格式图书。建议使用BT下载工具Free Download Manager进行下载,简称FDM(免费,没有广告,支持多平台)。本站资源全部打包为BT种子。所以需要使用专业的BT下载软件进行下载。如BitComet qBittorrent uTorrent等BT下载工具。迅雷目前由于本站不是热门资源。不推荐使用!后期资源热门了。安装了迅雷也可以迅雷进行下载!
(文件页数 要大于 标注页数,上中下等多册电子书除外)
注意:本站所有压缩包均有解压码: 点击下载压缩包解压工具
图书目录
1.Zero to Sixty:Introducing Scala1
Why Scala?1
The Seductions of Scala2
What About Java 8?3
Installing Scala3
Using SBT5
Running the Scala Command-Line Tools7
Running the Scala REPL in IDEs9
A Taste of Scala9
A Taste of Concurrency19
Recap and What's Next30
2.Type Less,Do More33
Semicolons33
Variable Declarations34
Ranges36
Partial Functions37
Method Declarations38
Method Default and Named Arguments38
Methods with Multiple Argument Lists39
A Taste of Futures41
Nesting Method Definitions and Recursion43
Inferring Type Information46
Reserved Words51
Literal Values53
Integer Literals54
Floating-Point Literals55
Boolean Literals55
Character Literals56
String Literals56
Symbol Literals58
Function Literals58
Tuple Literals59
Option,Some,and None:Avoiding nulls60
Sealed Class Hierarchies62
Organizing Code in Files and Namespaces63
Importing Types and Their Members65
Imports Are Relative66
Package Objects66
Abstract Types Versus Parameterized Types67
Recap and What's Next70
3.RoundingOuttheBasics71
Operator Overloading?71
Syntactic Sugar74
Methods with Empty Argument Lists74
Precedence Rules75
Domain-Specific Languages76
Scala if Statements77
Scala for Comprehensions78
for Loops78
Generator Expressions79
Guards:Filtering Values79
Yielding80
Expanded Scope and Value Definitions81
Other Looping Constructs83
Scala while Loops83
Scala do-while Loops83
Conditional Operators84
Using try,catch,and finally Clauses84
Call by Name,Call by Value87
lazy val91
Enumerations92
Interpolated Strings94
Traits:Interfaces and"Mixins"in Scala96
Recap and What's Next99
4.PatternMatching101
A Simple Match101
Values,Variables,and Types in Matches102
Matching on Sequences106
Matching on Tuples110
Guards in case Clauses111
Matching on case Classes111
unapply Method113
unapplySeq Method117
Matching on Variable Argument Lists119
Matching on Regular Expressions120
More on Binding Variables in case Clauses121
More on Type Matching122
Sealed Hierarchies and Exhaustive Matches123
Other Uses of Pattern Matching126
Concluding Remarks on Pattern Matching129
Recap and What's Next130
5.Implicits131
Implicit Arguments131
Using implicitly133
Scenarios for Implicit Arguments134
Execution Contexts134
Capabilities135
Constraining Allowed Instances135
Implicit Evidence140
Working Around Erasure142
Improving Error Messages144
Phantom Types145
Rules for Implicit Arguments148
Implicit Conversions149
Build Your Own String Interpolator153
The Expression Problem155
Type Class Pattern156
Technical Issues with Implicits158
Implicit Resolution Rules160
Scala's Built-in Implicits161
Wise Use of Implicits168
Recap and What's Next168
6.Functional Programmingin Scala169
What Is Functional Programming?170
Functions in Mathematics170
Variables That Aren't171
Functional Programming in Scala174
Anonymous Functions,Lambdas,and Closures175
Purity Inside Versus Outside178
Recursion178
Tail Calls and Tail-Call Optimization179
Trampoline for Tail Calls180
Partially Applied Functions Versus Partial Functions181
Currying and Other Transformations on Functions183
Functional Data Structures187
Sequences187
Maps192
Sets194
Traversing,Mapping,Filtering,Folding,and Reducing194
Traversal195
Mapping196
Flat Mapping198
Filtering199
Folding and Reducing201
Left Versus Right Traversals206
Tail Recursion Versus Traversals of Infinite Collections209
Combinators:Software's Best Component Abstractions212
What About Making Copies?216
Recap and What's Next218
7.forComprehensionsinDepth221
Recap:The Elements of for Comprehensions221
for Comprehensions:Under the Hood224
Translation Rules of for Comprehensions226
Options and Other Container Types230
Option as a Container230
Either:A Logical Extension to Option234
Try:When There Is No Do238
Scalaz Validation240
Recap and What's Next243
8.Object-Oriented Programmingin Scala245
Class and Object Basics246
Reference Versus Value Types248
Value Classes250
Parent Types253
Constructors in Scala254
Fields in Classes258
The Uniform Access Principle260
Unary Methods261
Validating Input261
Calling Parent Class Constructors(and Good Object-Oriented Design)263
Good Object-Oriented Design:A Digression264
Nested Types269
Recap and What's Next270
9.Traits271
Interfacesin Java 8271
Traits as Mixins272
Stackable Traits277
Constructing Traits282
Classor Trait?283
Recap and What's Next284
10.The Scala Object System,PartⅠ285
Parameterized Types:Variance Under Inheritance285
Functions Under the Hood286
Variance of Mutable Types290
Variance in Scala Versus Java292
The Scala Type Hierarchy294
Much Ado About Nothing(and Null)295
Products,Case Classes,and Tuples299
The Predef Object301
Implicit Conversions301
Type Definitions304
Condition Checking Methods305
Input and Output Methods305
Miscellaneous Methods307
Equality of Objects308
The equals Method308
The==and!=Methods309
The eq and ne Methods309
Array Equality and the same Elements Method310
Recap and What's Next310
11.The Scala Object System,Part Ⅱ311
Overriding Members of Classes and Traits311
Avoid Overriding Concrete Members312
Attempting to Override final Declarations314
Overriding Abstract and Concrete Methods315
Overriding Abstract and Concrete Fields317
Overriding Abstract Types323
When Accessor Methods and Fields Are Indistinguishable:The Uniform Access Principle324
Linearization of an Object's Hierarchy326
Recap and What's Next331
12.The Scala Collections Library333
Generic,Mutable,Immutable,Concurrent,and Parallel Collections,Oh My!333
The scala.collection Package334
The collection.concurrent Package336
The collection.convert Package336
The collection.generic Package336
The collection.immutable Package336
The scala.collection.mutable Package338
The scala.collection.parallel Package339
Choosing a Collection341
Design Idioms in the Collections Library342
Builder342
Can Build From343
Like Traits344
Specialization for Value Types345
Miniboxing346
Recap and What'sNext347
13.Visibility Rules349
Public Visibility:The Default349
Visibility Keywords350
Public Visibility351
Protected Visibility352
Private Visibility353
Scoped Private and Protected Visibility355
Final Thoughts on Visibility361
Recap and What'sNext362
14.Scala's Type System,Part Ⅰ363
Parameterized Types364
Variance Annotations364
Type Constructors364
Type Parameter Names364
Type Bounds365
Upper Type Bounds365
Lower Type Bounds366
Context Bounds370
View Bounds371
Understanding Abstract Types373
Comparing Abstract Types and Parameterized Types374
Self-Type Annotations376
Structural Types381
Compound Types385
Type Refinements385
Existential Types386
Recap and What's Next388
15.Scala'sTypeSystem,Part Ⅱ389
Path-Dependent Types389
C.this390
C.super390
path.x391
Dependent Method Types392
Type Projections393
Singleton Types395
Types for Values396
Tuple Types396
Function Types397
Infix Types397
Higher-Kinded Types398
Type Lambdas402
Self-Recursive Types:F-Bounded Polymorphism404
Recap and What's Next405
16.Advanced Functional Programming407
Algebraic Data Types407
Sum Types Versus Product Types407
Properties of Algebraic Data Types409
Final Thought on Algebraic Data Types410
Category Theory410
About Categories411
The Functor Category412
The Monad Category417
The Importance ofMonad418
Recap and What's Next420
17.Tools for Concurrency423
The scala.sys.process Package423
Futures425
Async428
Robust,Scalable Concurrency with Actors429
Akka:Actors for Scala430
Actors:Final Thoughts441
Pickling and Spores442
Reactive Programming443
Recap and What's Next444
18.Scala for Big Data445
Big Data:A Brief History445
Improving Map Reduce with Scala447
Moving Beyond Map Reduce452
Categories for Mathematics453
A List of Scala-Based Data Tools454
Recap and What's Next455
19.Dynamic Invocation in Scala457
A Motivating Example:ActiveRecord in Ruby on Rails457
Dynamic Invocation in Scala with the Dynamic Trait458
DSL Considerations463
Recap andWhat'sNext463
20.Domain-Specific Languages in Scala465
Examples:XML and JSON DSLs for Scala466
Internal DSLs468
External DSLs with Parser Combinators473
About Parser Combinators473
A Payroll External DSL473
Internal Versus External DSLs:Final Thoughts476
Recap and What's Next477
21.Scala Tools and Libraries479
Command-Line Tools479
scalac Command-Line Tool479
The scala Command-Line Tool483
The scalap and iavap Command-Line Tools487
The scaladoc Command-Line Tool488
The fsc Command-Line Tool488
Build Tools488
SBT, the Standard Build Tool for Scala488
Other Build Tools490
Integration with IDEs and Text Editors491
Text Editors492
Test-Driven Development in Scala492
Third-Party Libraries493
Recap and What's Next495
22.Java Interoperability497
Using Java Names in Scala Code497
Java and Scala Generics497
JavaBean Properties499
AnyVal Types and Java Primitives501
Scala Names in Java Code501
Recap and What's Next501
23.Application Design503
Recap of What We Already Know503
Annotations504
Traits as Modules508
Design Patterns510
Creational Patterns510
Structural Patterns511
Behavioral Patterns512
Better Design with Design by Contract514
The Parthenon Architecture517
Recap and What's Next522
24.Metaprogramming:Macros and Reflection523
Tools for Understanding Types524
Runtime Reflection524
Reflecting on Types525
Class Tags,Type Tags,and Manifests526
Scala's Advanced Runtime Reflection API527
Macros531
A Macro Example:Enforcing Invariants533
Final Thoughts on Macros536
Wrapping Up and Looking Ahead537
A.References539
Index545