[内容推荐]
Scala这种JVM语言通过新式对象模型、函数式编 程和高级类型系统带来的优势提升了语言的运行效率 。这本综合性的书籍——万普勒、佩恩编*的 《Scala编程(第2版影印版)(英文版)》包含了大量的 程序代码示例,向你展示如何在开发中利用语言和生 态系统而立刻变得*具有效率,同时解释了对于当今 支持并发和分布式的高度可扩展的、以数据为中心的 应用程序而言,Scala为什么是一个理想选择。
第2版包含了*新的语言特性,加人了关于模式 匹配、推导和高级函数式编程的新章节。同时你也可 以学习到Scala的命令行工具、第三方工具、库、面 向编辑器和集成开发环境的语言感知插件。这本书是 初级和高级Scala开发人员的理想选择。
这本***的数据科学书籍中的示例代码在一 个公共的GitHub库中得到维护。采用Turnkey Linux 虚拟机可以很容易地访问代码,这有利于基于 IPython Notebooks易用集合的交互式学习 Scala这种JVM语言通过新式对象模型、函数式编 程和高级类型系统带来的优势提升了语言的运行效率 。这本综合性的书籍——万普勒、佩恩编*的 《Scala编程(第2版影印版)(英文版)》包含了大量的 程序代码示例,向你展示如何在开发中利用语言和生 态系统而立刻变得*具有效率,同时解释了对于当今 支持并发和分布式的高度可扩展的、以数据为中心的 应用程序而言,Scala为什么是一个理想选择.
[目录]
Preface
1. Zero to Sixty: Introducing Scala
Why Scala?
The Seductions of Scala
What About Java 8?
Installing Scala
Using SBT
Running the Scala Command-Line Tools
Running the Scala REPL in IDEs
A Taste of Scala
A Taste of Concurrency
Recap and What's Next
2. Type Less, Do More
Semicolons
Variable Declarations
Ranges
Partial Functions
Method Declarations
Method Default and Named Arguments
Methods with Multiple Argument Lists
A Taste of Futures
Nesting Method Definitions and Recursion
Inferring Type Information
Reserved Words
Literal Values
Integer Literals
Floating-Point Literals
Boolean Literals
Character Literals
String Literals
Symbol Literals
Function Literals
Tuple Literals
Option, Some, and None: Avoiding nulls
Sealed Class Hierarchies
Organizing Code in Files and Namespaces
Importing Types and Their Members
Imports Are Relative
Package Objects
Abstract Types Versus Parameterized Types
Recap and What's Next
3. Rounding 0ut the Basics
Operator Overloading?
Syntactic Sugar
Methods with Empty Argument Lists
Precedence Rules
Domain-Specific Languages
Scala if Statements
Scala for Comprehensions
for Loops
Generator Expressions
Guards: Filtering Values
Yielding
Expanded Scope and Value Definitions
Other Looping Constructs
Scala while Loops
Scala do-while Loops
Conditional Operators
Using try, catch, and finally Clauses
Call by Name, Call by Value
lazy val
Enumerations
Interpolated Strings
Traits: Interfaces and "Mixins" in Scala
Recap and What's Next
4. Pattern Matching
5. Implicits
6. Functional Programming in Scala
7. for Comprehensions in Depth
8. Object-Oriented Programming in Scala
9. Traits
10. The Scala Object System, Part Ⅰ
11. The Scala Object System, Part Ⅱ.
12. The Scala Collections Library
13. Visibility Rules
14. Scala's Type System, Part Ⅰ
15. Scala's Type System, Part Ⅱ
16. Advanced Functional Programming
17. Tools for Concurrency
18. Scala for Big Data
19. Dynamic Invocation in Scala.
20. Domain-Specific Languages in Scala
21. Scala Tools and Libraries.
22. Java Interoperability.
23. Application Design
24. Metaprogramming: Macros and Reflection.