Programming Scala - Dean Wampler, Alex Payne

Programming Scala

Scalability = Functional Programming + Objects
Buch | Softcover
586 Seiten
2014 | 2nd Revised edition
O'Reilly Media (Verlag)
978-1-4919-4985-6 (ISBN)
44,85 inkl. MwSt
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
Get up to speed on Scala, the JVM language that offers all the benefits of a modern object model, functional programming, and an advanced type system. Packed with code examples, this comprehensive book shows you how to be productive with the language and ecosystem right away, and explains why Scala is ideal for today's highly scalable, data-centric applications that support concurrency and distribution.

This second edition covers recent language features, with new chapters on pattern matching, comprehensions, and advanced functional programming. You’ll also learn about Scala’s command-line tools, third-party tools, libraries, and language-aware plugins for editors and IDEs. This book is ideal for beginning and advanced Scala developers alike.
  • Program faster with Scala’s succinct and flexible syntax
  • Dive into basic and advanced functional programming (FP) techniques
  • Build killer big-data apps, using Scala’s functional combinators
  • Use traits for mixin composition and pattern matching for data extraction
  • Learn the sophisticated type system that combines FP and object-oriented programming concepts
  • Explore Scala-specific concurrency tools, including Akka
  • Understand how to develop rich domain-specific languages
  • Learn good design techniques for building scalable and robust Scala applications

Dean Wampler is a Principal Consultant at Think Big Analytics, where he specializes in "Big Data" problems and tools like Hadoop and Machine Learning. Besides Big Data, he specializes in Scala, the JVM ecosystem, JavaScript, Ruby, functional and object-oriented programming, and Agile methods. 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.

Alex Payne is Platform Lead at Twitter, where he develops services that enable programmers to build atop the popular social messaging service.

Chapter 1Zero to Sixty: Introducing Scala
Why Scala?
Installing Scala
A Taste of Scala
A Taste of Concurrency
Recap and What’s Next
Chapter 2Type Less, Do More
Semicolons
Variable Declarations
Ranges
Partial Functions
Method Declarations
Inferring Type Information
Reserved Words
Literal Values
Option, Some, and None: Avoiding nulls
Sealed Class Hierarchies
Organizing Code in Files and Namespaces
Importing Types and Their Members
Abstract Types Versus Parameterized Types
Recap and What’s Next
Chapter 3Rounding Out the Basics
Operator Overloading?
Methods with Empty Argument Lists
Precedence Rules
Domain-Specific Languages
Scala if Statements
Scala for Comprehensions
Other Looping Constructs
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
Chapter 4Pattern Matching
A Simple Match
Values, Variables, and Types in Matches
Matching on Sequences
Matching on Tuples
Guards in case Clauses
Matching on case Classes
Matching on Variable Argument Lists
Matching on Regular Expressions
More on Binding Variables in case Clauses
More on Type Matching
Sealed Hierarchies and Exhaustive Matches
Other Uses of Pattern Matching
Concluding Remarks on Pattern Matching
Recap and What’s Next
Chapter 5Implicits
Implicit Arguments
Scenarios for Implicit Arguments
Implicit Conversions
Type Class Pattern
Technical Issues with Implicits
Implicit Resolution Rules
Scala’s Built-in Implicits
Wise Use of Implicits
Recap and What’s Next
Chapter 6Functional Programming in Scala
What Is Functional Programming?
Functional Programming in Scala
Recursion
Tail Calls and Tail-Call Optimization
Partially Applied Functions Versus Partial Functions
Currying and Other Transformations on Functions
Functional Data Structures
Traversing, Mapping, Filtering, Folding, and Reducing
Left Versus Right Traversals
Combinators: Software’s Best Component Abstractions
What About Making Copies?
Recap and What’s Next
Chapter 7for Comprehensions in Depth
Recap: The Elements of for Comprehensions
for Comprehensions: Under the Hood
Translation Rules of for Comprehensions
Options and Other Container Types
Recap and What’s Next
Chapter 8Object-Oriented Programming in Scala
Class and Object Basics
Reference Versus Value Types
Value Classes
Parent Types
Constructors in Scala
Fields in Classes
Validating Input
Calling Parent Class Constructors (and Good Object-Oriented Design)
Nested Types
Recap and What’s Next
Chapter 9Traits
Interfaces in Java 8
Traits as Mixins
Stackable Traits
Constructing Traits
Class or Trait?
Recap and What’s Next
Chapter 10The Scala Object System, Part I
Parameterized Types: Variance Under Inheritance
The Scala Type Hierarchy
Much Ado About Nothing (and Null)
Products, Case Classes, and Tuples
The Predef Object
Equality of Objects
Recap and What’s Next
Chapter 11The Scala Object System, Part II
Overriding Members of Classes and Traits
Linearization of an Object’s Hierarchy
Recap and What’s Next
Chapter 12The Scala Collections Library
Generic, Mutable, Immutable, Concurrent, and Parallel Collections, Oh My!
Choosing a Collection
Design Idioms in the Collections Library
Specialization for Value Types
Recap and What’s Next
Chapter 13Visibility Rules
Public Visibility: The Default
Visibility Keywords
Public Visibility
Protected Visibility
Private Visibility
Scoped Private and Protected Visibility
Final Thoughts on Visibility
Recap and What’s Next
Chapter 14Scala’s Type System, Part I
Parameterized Types
Type Bounds
Context Bounds
View Bounds
Understanding Abstract Types
Self-Type Annotations
Structural Types
Compound Types
Existential Types
Recap and What’s Next
Chapter 15Scala’s Type System, Part II
Path-Dependent Types
Dependent Method Types
Type Projections
Types for Values
Higher-Kinded Types
Type Lambdas
Self-Recursive Types: F-Bounded Polymorphism
Recap and What’s Next
Chapter 16Advanced Functional Programming
Algebraic Data Types
Category Theory
Recap and What’s Next
Chapter 17Tools for Concurrency
The scala.sys.process Package
Futures
Robust, Scalable Concurrency with Actors
Akka: Actors for Scala
Pickling and Spores
Reactive Programming
Recap and What’s Next
Chapter 18Scala for Big Data
Big Data: A Brief History
Improving MapReduce with Scala
Moving Beyond MapReduce
Categories for Mathematics
A List of Scala-Based Data Tools
Recap and What’s Next
Chapter 19Dynamic Invocation in Scala
A Motivating Example: ActiveRecord in Ruby on Rails
Dynamic Invocation in Scala with the Dynamic Trait
DSL Considerations
Recap and What’s Next
Chapter 20Domain-Specific Languages in Scala
Examples: XML and JSON DSLs for Scala
Internal DSLs
External DSLs with Parser Combinators
Internal Versus External DSLs: Final Thoughts
Recap and What’s Next
Chapter 21Scala Tools and Libraries
Command-Line Tools
Build Tools
Integration with IDEs and Text Editors
Test-Driven Development in Scala
Third-Party Libraries
Recap and What’s Next
Chapter 22Java Interoperability
Using Java Names in Scala Code
Java and Scala Generics
JavaBean Properties
AnyVal Types and Java Primitives
Scala Names in Java Code
Recap and What’s Next
Chapter 23Application Design
Recap of What We Already Know
Annotations
Traits as Modules
Design Patterns
Better Design with Design by Contract
The Parthenon Architecture
Recap and What’s Next
Chapter 24Metaprogramming: Macros and Reflection
Tools for Understanding Types
Runtime Reflection
Scala’s Advanced Runtime Reflection API
Macros
Wrapping Up and Looking Ahead
Appendix References

Erscheint lt. Verlag 5.12.2014
Verlagsort Sebastopol
Sprache englisch
Maße 187 x 231 mm
Gewicht 980 g
Einbandart Paperback
Themenwelt Mathematik / Informatik Informatik Programmiersprachen / -werkzeuge
Mathematik / Informatik Informatik Theorie / Studium
Mathematik / Informatik Informatik Web / Internet
Schlagworte Funktionales Programmieren • Java • Java Virtual Machine (JVM) • JVM • Scala • Skalierbarkeit
ISBN-10 1-4919-4985-6 / 1491949856
ISBN-13 978-1-4919-4985-6 / 9781491949856
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
Das Handbuch für Webentwickler

von Philip Ackermann

Buch | Hardcover (2023)
Rheinwerk (Verlag)
49,90
das große Praxisbuch – Grundlagen, fortgeschrittene Themen und Best …

von Ferdinand Malcher; Danny Koppenhagen; Johannes Hoppe

Buch | Hardcover (2023)
dpunkt (Verlag)
42,90
Programmiersprache, grafische Benutzeroberflächen, Anwendungen

von Ulrich Stein

Buch | Hardcover (2023)
Hanser (Verlag)
39,99