Scala Style Guide

Scala does not have an official style guide yet. Because of this, Daniel Spiewak posted such a document in November 2009 on the Scala mailing list. As can be read there, even Martin Odersky, the inventor of Scala, likes that idea and thinks about publishing the document on the official Scala website.

The PDF version can be downloaded from the following website:

An online version is available under the following address:

The style guide is well structured. Each definition also contains the reason why you should format your code this way. Counter-examples show how unreadable code becomes, if you don’t.

Since I’m a proponent of structured coding I can recommend this document to everyone working with Scala. If you’re new to the language, you should read the style guide very soon to avoid getting into “bad habits”. By following the rules from the style guide you can increase readability of your Scala program which also improves extensibility and maintainability.