Book description
Learn how to be more productive with Scala, a new multi-paradigm language for the Java Virtual Machine (JVM) that integrates features of both object-oriented and functional programming. With this book, you'll discover why Scala is ideal for highly scalable, component-based applications that support concurrency and distribution.
Programming Scala clearly explains the advantages of Scala as a JVM language. You'll learn how to leverage the wealth of Java class libraries to meet the practical needs of enterprise and Internet projects more easily. Packed with code examples, this book provides useful information on Scala's command-line tools, third-party tools, libraries, and available language-aware plugins for editors and IDEs.
- Learn how Scala's succinct and flexible code helps you program faster
- Discover the notable improvements Scala offers over Java's object model
- Get a concise overview of functional programming, and learn how Scala's support for it offers a better approach to concurrency
- Know how to use mixin composition with traits, pattern matching, concurrency with Actors, and other essential features
- Take advantage of Scala's built-in support for XML
- Learn how to develop domain-specific languages
- Understand the basics for designing test-driven Scala applications
Publisher resources
Table of contents
- Dedication
- A Note Regarding Supplemental Files
- Foreword
- Preface
- 1. Zero to Sixty: Introducing Scala
-
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
- 3. Rounding Out the Essentials
- 4. Traits
- 5. Basic Object-Oriented Programming in Scala
-
6. Advanced Object-Oriented Programming In Scala
-
Overriding Members of Classes and Traits
- Attempting to Override final Declarations
- Overriding Abstract and Concrete Methods
- Overriding Abstract and Concrete Fields
- Overriding Abstract and Concrete Fields in Traits
- Overriding Abstract and Concrete Fields in Classes
- Overriding Abstract Types
- When Accessor Methods and Fields Are Indistinguishable: The Uniform Access Principle
- Companion Objects
- Case Classes
- Equality of Objects
- Recap and What’s Next
-
Overriding Members of Classes and Traits
- 7. The Scala Object System
-
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
- 9. Robust, Scalable Concurrency with Actors
- 10. Herding XML in Scala
- 11. Domain-Specific Languages in Scala
- 12. The Scala Type System
- 13. Application Design
- 14. Scala Tools, Libraries, and IDE Support
- A. References
- Glossary
- Index
- About the Authors
- Colophon
- Copyright
Product information
- Title: Programming Scala
- Author(s):
- Release date: September 2009
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9780596155957
You might also like
book
Learning Scala Programming
Learn how to write scalable and concurrent programs in Scala, a language that grows with you. …
video
Beginning Scala Programming
In this Beginning Scala Programming training course, expert author Daniel Hinojosa will teach you everything you …
book
Scala Programming Projects
Discover unique features and powerful capabilities of Scala Programming as you build projects in a wide …
book
Learning Scala
Why learn Scala? You don’t need to be a data scientist or distributed computing expert to …