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
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
Designing Data-Intensive Applications
Data is at the center of many challenges in system design today. Difficult issues need to …
book
Generative Deep Learning, 2nd Edition
Generative AI is the hottest topic in tech. This practical book teaches machine learning engineers and …
book
Spring Boot: Up and Running
With over 75 million downloads per month, Spring Boot is the most widely used Java framework …
book
Robust Python
Does it seem like your Python projects are getting bigger and bigger? Are you feeling the …