Scala cookbook recipes

Wow, I began by writing a few Scala programming tutorials just because I like the language, and as I look here a couple of months later I now have more than sixty tutorials. As a result, I thought I'd start organizing them here in the form a Scala Programming Cookbook.

Here's my current collection of Scala FAQs and recipes, in a "cookbook" format.

General Scala programming recipes

Scala classes and methods

Scala try/catch/finally block examples

Scala collection recipes

Scala Array examples:

Scala List examples:

Scala Map examples:

Iterating and looping over Scala collections:

Scala tuples:

Using Scala parallel programming methods and classes:

Scala String recipes

Functions and functional programming recipes

Scala web development recipes

Scala email recipes

Scala database recipes

Scala file read, write, input/output recipes

Scala command line and script recipes

Web service recipes

Scala XML recipes

Scala build, testing, and debugging recipes

Scala Actors and concurrency

Scala programming idioms

Example algorithms

Scala cookbook recipes - summary

As mentioned, I'm just putting this collection of Scala programming recipes out here today, and I'll try to clean up and organize them in the coming days.


On a side note, I was using Scala on a personal project and rewrote some Java code using Scala. As much as I complained yesterday about Scala's complexity, the slow compiler, and poor IDE support, I must admit one thing: the resulting code was noticeably cleaner, shorter, and easier to read.


Do you plan an update of your 2013 book "Scala Cookbook, Recipes for Object-Oriented and Functional Programming" sometime soon?

Regards, David

I wish I could, but I’m currently writing a book on Scala and functional programming, and also dealing with some health issues, so even though I’ve made a lot of notes for a new version of the Cookbook, I won’t be able to release a new version in 2016.

All the best,