📘 Disclaimer: This book is published under a Creative Commons license and is freely available via GitHub.

Scala Book pdf

Scala Book (PDF, MOBI, HTML, EPUB) -- bookcover

Scala Book



The Scala Book is a vibrant and approachable guide for anyone curious about Scala. Whether you’re just starting out or have some experience under your belt, this book makes learning Scala feel less like a chore and more like an adventure. With clear explanations and practical examples, it covers everything you need to get comfortable with the language. The best part? It’s available in multiple formatsPDF, MOBI, HTML, and EPUBso you can read it anywhere, anytime.


Contents of the Book

  • Prelude: A Taste of Scala
  • Preliminaries
  • Scala Features
  • Hello, World
  • Hello, World – Version 2
  • The Scala REPL
  • Two Types of Variables
  • The Type is Optional
  • A Few Built-In Types
  • Two Notes About Strings
  • Command-Line I/O
  • Control Structures
  • The if/then/else Construct
  • for Loops
  • for Expressions
  • match Expressions
  • try/catch/finally Expressions
  • Scala Classes
  • Auxiliary Class Constructors
  • Supplying Default Values for Constructor Parameters
  • A First Look at Scala Methods
  • Enumerations (and a Complete Pizza Class)
  • Scala Traits and Abstract Classes
  • Using Scala Traits as Interfaces
  • Using Scala Traits Like Abstract Classes
  • Abstract Classes
  • Scala Collections
  • The ArrayBuffer Class
  • The List Class
  • The Vector Class
  • The Map Class
  • The Set Class
  • Anonymous Functions
  • Common Sequence Methods
  • Common Map Methods
  • A Few Miscellaneous Items
  • Tuples
  • An OOP Example
  • SBT and ScalaTest
  • The Scala Build Tool (SBT)
  • Using ScalaTest with SBT
  • Writing BDD Style Tests with ScalaTest and SBT
  • Functional Programming
  • Pure Functions
  • Passing Functions Around
  • No Null Values
  • Companion Objects
  • Case Classes
  • Case Objects
  • Functional Error Handling in Scala
  • Concurrency
  • Scala Futures
  • Where To Go Next

Book Description

In these pages, Scala Book provides a quick introduction and overview of the Scala programming language. The book is written in an informal style, and consists of more than 50 small lessons. Each lesson is long enough to give you an idea of how the language features in that lesson work, but short enough that you can read it in fifteen minutes or less.

One note before beginning:

 In regards to programming style, most Scala programmers indent their code with two spaces, but we use four spaces because we think it makes the code easier to read, especially in a book format. To begin reading, click the “next” link, or select the Prelude: A Taste of Scala lesson in the table of contents..

Book Overview

This book opens up with the basicsvariables, functions, classesand quickly ramps up to more advanced topics like collections and pattern matching. It’s packed with practical advice and real-world scenarios. If you’ve already checked out resources like Hello, Scala Free Preview PDF by Alvin Alexander, you’ll love how this book takes things further but keeps the tone friendly. There are plenty of “Aha!” moments sprinkled throughout. I mean, who doesn’t love a good lightbulb moment?

Why Read This Book

Let’s be honestScala can seem intimidating at first. But this book breaks down barriers and makes learning fun (yes, fun!). It doesn’t assume you’re a programming wizard. Instead, it guides you gently but confidently into the world of functional programming and object-oriented techniques. If you’ve ever wondered how Scala stacks up against other languages or wanted to build robust applications quickly, this is your ticket in. Plus, it’s so much more approachable than some of those massive textbooks out there.

Who This Book Is For

This isn’t just for hardcore coders. Beginners will find the explanations super accessible. If you’re already familiar with another language but want to add Scala to your toolkit, you’ll appreciate how the book bridges concepts you already know. And if you’ve dabbled with Essential Scala, you’ll notice how these resources complement each otherone lays the groundwork while the other builds on it with personality.

What You Will Learn

  • The basics: variables, types, and expressions
  • How to write functions and use higher-order functions
  • Object-oriented features in Scala (classes and traits)
  • Pattern matching and case classes for smarter code
  • Working with collections like lists and maps
  • Functional programming principles made simple
  • Error handling without losing your mind
  • Tons of real-world examples you can actually use
  • Tips for writing clean and maintainable code

Screenshot from the Book

Scala Book (PDF, MOBI, HTML, EPUB) -- book_excerpt_screenshot

Book Details


Length: 225 Pages

Language: English

PDF Size: 1.16 Mbs

Category: 

Report Broken Link

File Copyright Claim

Comments

Leave a Reply

Categories

Related Posts

Split List into Columns
PDF Viewer

Please wait while the PDF is loading...
📘 Download PDF Book