Buying Options
Programming Scala
Print $44.99
Add to Cart
Print+Ebook $49.49
Add to Cart
Ebook $35.99
Add to Cart
Safari Books Online
Add to Cart
What is this?
Print £34.50
Add to Cart
What is this?
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. You'll also learn how to leverage the wealth of Java class libraries to meet the practical needs of enterprise and Internet projects more easily.
Full Description
Table of Contents
  1. Chapter 1 Zero to Sixty: Introducing Scala

    1. Why Scala?

    2. Installing Scala

    3. For More Information

    4. A Taste of Scala

    5. A Taste of Concurrency

    6. Recap and What’s Next

  2. Chapter 2 Type Less, Do More

    1. In This Chapter

    2. Semicolons

    3. Variable Declarations

    4. Method Declarations

    5. Inferring Type Information

    6. Literals

    7. Tuples

    8. Option, Some, and None: Avoiding nulls

    9. Organizing Code in Files and Namespaces

    10. Importing Types and Their Members

    11. Abstract Types And Parameterized Types

    12. Reserved Words

    13. Recap and What’s Next

  3. Chapter 3 Rounding Out the Essentials

    1. Operator? Operator?

    2. Methods Without Parentheses and Dots

    3. Domain-Specific Languages

    4. Scala if Statements

    5. Scala for Comprehensions

    6. Other Looping Constructs

    7. Conditional Operators

    8. Pattern Matching

    9. Enumerations

    10. Recap and What’s Next

  4. Chapter 4 Traits

    1. Introducing Traits

    2. Stackable Traits

    3. Constructing Traits

    4. Recap and What’s Next

  5. Chapter 5 Basic Object-Oriented Programming in Scala

    1. Class and Object Basics

    2. Parent Classes

    3. Constructors in Scala

    4. Nested Classes

    5. Visibility Rules

    6. Recap and What’s Next

  6. Chapter 6 Advanced Object-Oriented Programming In Scala

    1. Overriding Members of Classes and Traits

    2. Companion Objects

    3. Case Classes

    4. Equality of Objects

    5. Recap and What’s Next

  7. Chapter 7 The Scala Object System

    1. The Predef Object

    2. Classes and Objects: Where Are the Statics?

    3. Sealed Class Hierarchies

    4. The Scala Type Hierarchy

    5. Linearization of an Object’s Hierarchy

    6. Recap and What’s Next

  8. Chapter 8 Functional Programming in Scala

    1. What Is Functional Programming?

    2. Functional Programming in Scala

    3. Recursion

    4. Tail Calls and Tail-Call Optimization

    5. Functional Data Structures

    6. Traversing, Mapping, Filtering, Folding, and Reducing

    7. Pattern Matching

    8. Partial Functions

    9. Currying

    10. Implicits

    11. Implicit Function Parameters

    12. Call by Name, Call by Value

    13. Lazy Vals

    14. Recap: Functional Component Abstractions

  9. Chapter 9 Robust, Scalable Concurrency with Actors

    1. The Problems of Shared, Synchronized State

    2. Actors

    3. Actors in Scala

    4. Traditional Concurrency in Scala: Threading and Events

    5. Recap and What’s Next

  10. Chapter 10 Herding XML in Scala

    1. Reading XML

    2. Writing XML

    3. Recap and What’s Next

  11. Chapter 11 Domain-Specific Languages in Scala

    1. Internal DSLs

    2. External DSLs with Parser Combinators

    3. Recap and What’s Next

  12. Chapter 12 The Scala Type System

    1. Reflecting on Types

    2. Understanding Parameterized Types

    3. Variance Under Inheritance

    4. Type Bounds

    5. Nothing and Null

    6. Understanding Abstract Types

    7. Path-Dependent Types

    8. Value Types

    9. Self-Type Annotations

    10. Structural Types

    11. Existential Types

    12. Infinite Data Structures and Laziness

    13. Recap and What’s Next

  13. Chapter 13 Application Design

    1. Annotations

    2. Enumerations Versus Pattern Matching

    3. Thoughts On Annotations and Enumerations

    4. Using Nulls Versus Options

    5. Exceptions and the Alternatives

    6. Scalable Abstractions

    7. Effective Design of Traits

    8. Design Patterns

    9. Better Design with Design By Contract

    10. Recap and What’s Next

  14. Chapter 14 Scala Tools, Libraries, and IDE Support

    1. Command-Line Tools

    2. Build Tools

    3. Integration with IDEs

    4. Test-Driven Development in Scala

    5. Other Notable Scala Libraries and Tools

    6. Java Interoperability

    7. Java Library Interoperability

    8. Recap and What’s Next

  1. Appendix References

  2. Glossary

  3. Colophon

View Full Table of Contents
Product Details
Title:
Programming Scala
By:
Dean Wampler, Alex Payne
Publisher:
O'Reilly Media
Formats:
  • Print
  • 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
Customer Reviews
About the Authors
  1. Dean Wampler

    Dean Wampler is a Consultant, Trainer, and Mentor with Object Mentor, Inc. He specializes in Scala, Java, and Ruby. He works with clients on application design strategies that combine object-oriented programming, functional programming, and aspect-oriented programming. He also consults on Agile methods, like Lean and XP. Dean is a frequent speaker at industry and academic conferences on these topics. He has a Ph.D. in Physics from the University of Washington.

    View Dean Wampler's full profile page.

  2. Alex Payne

    Alex Payne is Platform Lead at Twitter, where he develops services that enable programmers to build atop the popular social messaging service. Alex has previously built web applications for political campaigns, non-profits, and early-stage startups, and supported information security efforts for military and intelligence customers. In his free time, Alex studies, speaks, and writes about the history, present use, and evolution of programming languages, as well as minimalist art and design.

    View Alex Payne's full profile page.

Colophon

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.

  • Book cover of Programming Scala