-
Chapter 1 Zero to Sixty: Introducing Scala
-
Why Scala?
-
Installing Scala
-
For More Information
-
A Taste of Scala
-
A Taste of Concurrency
-
Recap and What’s Next
-
-
Chapter 2 Type Less, Do More
-
In This Chapter
-
Semicolons
-
Variable Declarations
-
Method Declarations
-
Inferring Type Information
-
Literals
-
Tuples
-
Option, Some, and None: Avoiding nulls
-
Organizing Code in Files and Namespaces
-
Importing Types and Their Members
-
Abstract Types And Parameterized Types
-
Reserved Words
-
Recap and What’s Next
-
-
Chapter 3 Rounding Out the Essentials
-
Operator? Operator?
-
Methods Without Parentheses and Dots
-
Domain-Specific Languages
-
Scala if Statements
-
Scala for Comprehensions
-
Other Looping Constructs
-
Conditional Operators
-
Pattern Matching
-
Enumerations
-
Recap and What’s Next
-
-
Chapter 4 Traits
-
Introducing Traits
-
Stackable Traits
-
Constructing Traits
-
Recap and What’s Next
-
-
Chapter 5 Basic Object-Oriented Programming in Scala
-
Class and Object Basics
-
Parent Classes
-
Constructors in Scala
-
Nested Classes
-
Visibility Rules
-
Recap and What’s Next
-
-
Chapter 6 Advanced Object-Oriented Programming In Scala
-
Overriding Members of Classes and Traits
-
Companion Objects
-
Case Classes
-
Equality of Objects
-
Recap and What’s Next
-
-
Chapter 7 The Scala Object System
-
The Predef Object
-
Classes and Objects: Where Are the Statics?
-
Sealed Class Hierarchies
-
The Scala Type Hierarchy
-
Linearization of an Object’s Hierarchy
-
Recap and What’s Next
-
-
Chapter 8 Functional Programming in Scala
-
What Is Functional Programming?
-
Functional Programming in Scala
-
Recursion
-
Tail Calls and Tail-Call Optimization
-
Functional Data Structures
-
Traversing, Mapping, Filtering, Folding, and Reducing
-
Pattern Matching
-
Partial Functions
-
Currying
-
Implicits
-
Implicit Function Parameters
-
Call by Name, Call by Value
-
Lazy Vals
-
Recap: Functional Component Abstractions
-
-
Chapter 9 Robust, Scalable Concurrency with Actors
-
The Problems of Shared, Synchronized State
-
Actors
-
Actors in Scala
-
Traditional Concurrency in Scala: Threading and Events
-
Recap and What’s Next
-
-
Chapter 10 Herding XML in Scala
-
Reading XML
-
Writing XML
-
Recap and What’s Next
-
-
Chapter 11 Domain-Specific Languages in Scala
-
Internal DSLs
-
External DSLs with Parser Combinators
-
Recap and What’s Next
-
-
Chapter 12 The Scala Type System
-
Reflecting on Types
-
Understanding Parameterized Types
-
Variance Under Inheritance
-
Type Bounds
-
Nothing and Null
-
Understanding Abstract Types
-
Path-Dependent Types
-
Value Types
-
Self-Type Annotations
-
Structural Types
-
Existential Types
-
Infinite Data Structures and Laziness
-
Recap and What’s Next
-
-
Chapter 13 Application Design
-
Annotations
-
Enumerations Versus Pattern Matching
-
Thoughts On Annotations and Enumerations
-
Using Nulls Versus Options
-
Exceptions and the Alternatives
-
Scalable Abstractions
-
Effective Design of Traits
-
Design Patterns
-
Better Design with Design By Contract
-
Recap and What’s Next
-
-
Chapter 14 Scala Tools, Libraries, and IDE Support
-
Command-Line Tools
-
Build Tools
-
Integration with IDEs
-
Test-Driven Development in Scala
-
Other Notable Scala Libraries and Tools
-
Java Interoperability
-
Java Library Interoperability
-
Recap and What’s Next
-
-
Appendix References
-
Glossary
-
Colophon
- Title:
- Programming Scala
- By:
- Dean Wampler, Alex Payne
- Publisher:
- O'Reilly Media
- Formats:
-
- Ebook
- Safari Books Online
- Print Release:
- September 2009
- Ebook Release:
- September 2009
- Pages:
- 448
- Print ISBN:
- 978-0-596-15595-7
- | ISBN 10:
- 0-596-15595-6
- Ebook ISBN:
- 978-0-596-80652-1
- | ISBN 10:
- 0-596-80652-3
The animal on the cover of Programming Scala is a Malayan tapir (Tapirus indicus), also called an Asian tapir. It is a black-and-white hoofed mammal with a round, stocky body similar to that of a pig. At 6-8 feet long and 550-700 pounds, the Malayan is the largest of the four tapir species. It lives in tropical rain forests in Southeast Asia.
The Malayan tapir's appearance is striking: its front half and hind legs are solid black, and its midsection is marked with a white saddle. This pattern provides perfect camouflage for the tapir in a moonlit jungle. Other physical characteristics include a thick hide, a stumpy tail, and a short, flexible snout. Despite its body shape, the Malayan tapir is an agile climber and a fast runner.
The tapir is a solitary and mainly nocturnal animal. It tends to have very poor vision, so it relies on smell and hearing as it roams large territories in search of food, tracking other tapirs' scents and communicating via high-pitched whistles. The Malayan tapir's predators are tigers, leopards, and humans, and it is considered endangered due to habitat destruction and overhunting.
The cover image is from the Dover Pictorial Archive. The cover font is Adobe ITC Garamond. The text font is Linotype Birka; the heading font is Adobe Myriad Condensed; and the code font is LucasFont's TheSansMonoCondensed.
