Free ebook “Scala By Example” by Martin Odersky. Learn Scala through a series of examples. An excellent step-by-step introduction to many of the Scala features with the help of simple code examples.
Scala smoothly integrates object-oriented and functional programming. It is designed to express common programming patterns in a concise, elegant, and typesafe way. Scala introduces several innovative language constructs. For instance:
• Abstract types and mixin composition unify concepts fromobject andmodule
• Pattern matching over class hierarchies unifies functional and objectoriented
data access. It greatly simplifies the processing of XML trees.
• A flexible syntax and type system enables the construction of advanced libraries
and new domain specific languages.
At the same time, Scala is compatible with Java. Java libraries and frameworks can be used without glue code or additional declarations. This document introduces Scala in an informal way, through a sequence of examples.
Table of Contents
- Programming with Actors and Messages
- Expressions and Simple Functions
- First-Class Functions
- Classes and Objects
- Case Classes and Pattern Matching
- Generic Types and Methods
- Mutable State
- Computing with Streams
- Lazy Values
- Implicit Parameters and Conversions
- Hindley/Milner Type Inference
- Abstractions for Concurrency
Download Free PDF / Read Online
File size: 865.75 KB
Number of pages: 145