Home Page Icon
Home Page
Table of Contents for
You May Be Interested In…
Close
You May Be Interested In…
by Venkat Subramaniam
Pragmatic Scala
Pragmatic Scala
For the Best Reading Experience...
Table of Contents
Early praise for Pragmatic Scala
Acknowledgments
Introduction
Programming Styles in Scala
Scala and Other Languages
Who Is This Book For?
What’s in This Book?
Scala Version Used in This Book
Online Resources
Part 1: Getting Your Feet Wet
Chapter 1: Exploring Scala
Scala Features
More with Less
Functional Programming
Wrapping Up
Chapter 2: Taking Scala for a Ride
Using the REPL
Scala on the Command Line
Running Scala Code as a Stand-alone Script
Compiling Scala
Wrapping Up
Chapter 3: From Java to Scala
Scala as Concise Java
Scala Classes for Java Primitives
Tuples and Multiple Assignments
Flexible Parameters and Arguments
Implicit Parameters
Strings and Multiline Raw Strings
String Interpolation
Sensible Defaults
Operator Overloading
Scala Surprises for the Java Eyes
Default Access Modifier
Wrapping Up
Chapter 4: Working with Objects
Creating and Using Classes
Following the JavaBean Convention
Type Aliasing
Extending a Class
Parameterized Types
Singletons and Companions
Creating Enumerations
Package Objects
Wrapping Up
Chapter 5: Making Use of Types
Type Inference
Fundamental Types
Return Type Inference
Variance of Parameterized Type
Implicit Type Conversions
Value Classes
Using Implicit Conversions
Wrapping Up
Part 2: Diving Into Scala
Chapter 6: Function Values and Closures
Limitations of Normal Functions
Extensibility with Higher-Order Functions
Function Values with Multiple Parameters
Currying
Positional Notation for Parameters
Parameter Routing
Reusing Function Values
Partially Applied Functions
Closures
Execute Around Method Pattern
Wrapping Up
Chapter 7: Traits
Understanding Traits
Selective Mixins
Decorating with Traits
Method Late Binding in Traits
Wrapping Up
Chapter 8: Collections
Common Scala Collections
Using a Set
Associative Maps
Immutable Lists
Method Name Convention
The for Expression
Wrapping Up
Chapter 9: Pattern Matching and Regular Expressions
Comprehensive Matching
Pattern Variables and Constants in case Expressions
Matching Using case Classes
Extractors and Regular Expressions
The Omnipresent Underscore Character
Wrapping Up
Chapter 10: Handling Exceptions
Exceptions in Scala
Mind the Catch Order
Wrapping Up
Chapter 11: Programming Recursions
A Simple Recursion
Tail Call Optimization (TCO)
Trampoline Calls
Wrapping Up
Part 3: Concurrency in Scala
Chapter 12: Lazy Evaluations and Parallel Collections
Let’s Get Lazy
Making Strict Collections Lazy
The Ultimately Lazy Streams
Parallel Collections
Wrapping Up
Chapter 13: Programming with Actors
A Sequential Time-Consuming Problem
The Treacherous Paths to Concurrency
Creating Actors
Actors and Threads
Isolated Mutability
Concurrency with Actors
Usage Recommendations
Wrapping Up
Part 4: Applying Scala
Chapter 14: Intermixing with Java
Using Scala Classes from Scala
Using Java Classes from Scala
Using Scala Methods from Java
Using Traits from Java
Using Singletons and Companion Objects from Java
Extending Classes
Wrapping Up
Chapter 15: Creating an Application with Scala
Getting Users’ Input
Reading and Writing Files
XML as a First-Class Citizen
Reading and Writing XML
Getting Stock Prices from the Web
Making the Net Asset Application Concurrent
Wrapping Up
Chapter 16: Unit Testing
Using JUnit
Using ScalaTest
Using Mockito
Wrapping Up
Appendix 1: Installing Scala
Downloading
Installing
Appendix 2: Web Resources
Bibliography
You May Be Interested In…
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Bibliography
You May Be Interested In…
Click a cover for more information
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset