This book is the authoritative tutorial on the Scala programming language, co-written by the language's designer, Martin Odersky. This second edition provides more than 100 pages of new material that covers new features in Scala 2.8, including:
* The design of the new collections library * Structural subtyping * The new rules for implicits * Package objects * Chained package clauses * Named and default parameters * The copy method on case classes
Woah. Amazing! This is a great book. Excellently written. Of course it couldn't be a great book if it weren't for the fact that Scala is a totally awesome language. When I was teaching myself Perl, I had to read the book (*the* Perl book, _Programming Perl_), two times in order to get it. It was just so different from any programming language I had previously known, that I just couldn't get it the first time. I knew pretty early on into the Scala book that I would have to read it twice, for the same reason. This has never happened to me besides with Perl and Scala. Most programming languages are, well, pretty similar to some other programming language I already know. Scala is revolutionary. Don't mis-take me; I've done plenty of functional programming before. Perhaps if I had used Erlang before instead of Scheme, Scala might seem a bit easier. But in any case, wow. Everything about it just feels so awesome. Like if you just figured out how it was supposed to work, programming would be so easy, without any painful boilerplate, with language features to address scalability design problems that more traditional languages like Java just cannot handle. Of course, learning how to use it right is not going to be easy. If it were, it could never be so powerful. This is clearly a very carefully designed language, and designed by some very thoughtful and intelligent people with lots of experience in both programming and language design. All this, and the whole Java runtime at your fingertips. I am sold, 100%.
I've heard a lot of people refer to Programming in Scala as "dry" or "boring". I think this description is not accurate, and a more accurate description is "thorough".
Programming in Scala is not a book to get you up and running in Scala quickly, writing good Scala code as soon as possible. This book is about UNDERSTANDING Scala, and not just how to use it, but how it works internally, what aspects of it are merely syntax sugar, and what that sugar is converted to under the hood. It covers aspects of the compiler, the equivalent Java that Scala is being converted to, and virtually everything else. Programming in Scala puts you in the mind of the designer (no surprise, since most of the book was written by Scala's designer).
No stone is left unturned, no aspect left unmentioned. Programming in Scala is everything you would ever need to know about Scala and more. In fact, I wound up skipping a few chapters at the end, because I don't particularly care about GUI programming or parsing XML. This is THE Scala Bible.
If you're looking to get up and running in Scala soon, understanding enough to be a really good programmer with Scala, you want Scala for the Impatient by Cay Horstmann. But if you're the type of person who sees "magic" in programming languages and wonders why the hell that works at all, Programming in Scala is your book. It helps establish the underlying RULES of the language, the kind that, once you understand them, you can PREDICT how Scala would probably implement something.
The book is very long, and very dense, but it is not dry. Really good examples throughout, though sometimes the examples are so complex that the reader's brain devotes more time to understanding the examples than to learning the principles they wish to establish.
Overall, a very good Scala book, but perhaps not an ideal FIRST Scala book.
After completing about 40% of the book according to my Kindle for iPad this is what I have to say.
Things I love about the book: (1) the Kindle for iPad edition was very well formatted (has a hyperlinked table of contents, hyperlinks throughout the book, chapters start on a new page, well formatted and easy to read code examples)
Things I like about the book: (1) thorough (the book covers a lot of material) (2) clearly written with no obvious typos/errors (3) liked the way each chapter was organized. An Introduction followed by a more thorough discussion of the topic at hand followed by a summary of what was covered (4) This book will work well as a reference after reading it as it is organized well enough that you can jump straight to a particular topic
Things I dislike about the book: (1) choice of chapter order was not apparent to me. The book feels more like a lot of very well written tutorials, each covering a well defined topic, instead of a single unified tutorial (which is what I was expecting) with the goal of taking the reader from novice to a more advanced level. (2) code examples are more complicated than they need to be (3) the Kindle ebook does not have page numbers
Other thoughts: I am of the opinion that this book will not get you up and running quickly. You have to read quite a bit before you get to a point where you can write useful code (I would suggest reading at least up to and including chapter 17 -- My Kindle tells me this is 38% of the book -- when you consider that the paperback version has 852 pages, 38% translates to around 320 pages of book material). Also, I believe that Scala is different enough from other languages I have used or studied that I think that (at least parts of) the book would have required a second reading or I would have to have followed up this book with a different book (I did something similar -- see More on getting up to speed quickly below) before I could be effective with the language.
More on getting up to speed quickly: Before writing this review I also started taking the Coursera course () on Functional Programming using Scala taught by one the authors (Odersky). The course material is available even though the class has ended. There are only 7 days of college course style lectures with each day’s lecture lasting between 1 and 2 hours. If you want to get up to speed quickly, I highly recommend that course. I was up and running after the first day’s lecture. The course is a good way to follow up on the material in the book.
Finally: I gave this book five stars because this book is superior to other programming books I have read in terms how it is written (format), the material it contains (quantity and quality), how clearly that material is presented (readability), and how long I think the material will remain useful for (durability). I do not rank a lot of my books with 5 stars. I believe that I got a very good bang for the buck.
This is how a book about a programming language should be written. It gives you the basics, but also provides details that you should know to be effective and efficient using Scala. What makes the book really great is that it is useful even if you aren't planning on writing a line of Scala. There are a lot of good programming practices and patterns that are given in the book (both explicitly and implicitly).
TL;DR: This is the book to go if you want to feel comfortable about Scala, but it takes time and patience from the reader. The examples in this book won't teach you how to build complex systems. The Kindle version is perfect.
This book will teach you all the magic behind Scala. I liked this book a lot because it's simple to understand and clearly explain why some things happen in Scala. If you want to feel comfortable working with Scala, then this is the book to go.
However, it requires some effort and patience from the reader. For instance, I was expecting to learn about case classes, implicits and for comprehension right off the bat, but it took me 15, 20 and 23 chapters, respectively, before deep diving in it. I had to read about things that usually don't matter at first (but as important) such as Packages and Imports, Abstract Members, Scala's Hierarchy, Unit testing, etc. I felt that the chapters could have been sorted differently.
Another down side of this book is that most examples don't follow software engineering good practices and the reader has to be really careful about it. I strongly suggest reading after you finish this book. If you are looking for a book that will teach you how to build complex systems in Scala, this is not the book you want to read. The author is really clear about having short and concise examples to save the trees, so don't expect to see beautiful and clean code here.
To sum up, this is a really good book and you'll finish it feeling prepared to work with Scala, but it requires patience and time from the reader.
"... For those, who want to learn more about Scala, I'd like to recommend very good book, actually one of the best books I read this year. Despite the fact it's a technical book I would compare it to reading Harry Potter. Simple language, easy to understand, short chapters and can't stop reading it. Here is the link: Programming in Scala by Martin Odersky ..."
Tips for learning Scala from someone who did it against their will and is now the senior most Scala engineer in their office somehow*:
1. Google around for Twitter's material on Scala (specifically and ) and work through it. 2. Attempt some Scala. Be bad at it. Hate Scala. Swear it's the dumbest language ever invented and what on earth is functional programming doing. 3. Return to the Twitter material vaguely understanding better what Scala is and why it's the way it is. 4. Make peace with Scala. 5. Read this book, cover to cover —Ìýand I mean cover to cover. 6. Conquer the world.â€�
Now for the actual review
I just realized while cleaning up my CS shelf that I'd never marked down this book as having been read. And what a shame! Of all the books I read while starting to learn Scala and functional programming, this is the only one that was worth reading and the only one that was helpful.
Because honestly reading this book, written by the person who created Scala, really helped me grasp the language, see how I can use it, see where I can play with options, and get really into the nitty gritty as much as I wanted to.
You do not need any other book to learn Scala beyond this one. I read so many before this that were all meh at best, but this one was nothing like the rest.
*Yeah, I don't know either, but I've made it to step six so maybe that's why.
Quite likely the best book on Scala - not really surprising as it was co-written by Martin Odersky - Scala creator. The book itself is veeery comprehensive and details - some sneak-peaks inside collections' internals are indeed very astonishing. It's also well structured (contrary to some other Scala books), so the learning curve is as filed as possible (for Scala - so it's still not trivial).
I like the examples as well - especially the large-scale ones that are perfect to illustrate the general idea of functional programming in Scala.
What I didn't like? Book is ancient in its form - just text and code samples: sometimes a picture is worth more than 1000 words. It's not 100% up-to-date as well: content is based on Scala 2.8.1.
Anyway, if you're planning to learn Scala - I'm pretty sure you won't find a better resource to aid you.
Still the best book to get into Scala. A few complaints: 1. A lot of it needs to updated to the current language version. 2. Some examples in the book are mentally taxing and drive attention away from the main topic. 3. Type classes deserve more attention. 4. Their should be a greater emphasis on language philosophy.
Wirklich furchtbare Sprache und Grammatik. Kann aber der Autor mit seinem Buch nichts für.
Alles schön und gut aber mittlerweile nicht mehr auf aktuellen Stand. Hat mich viele tränendurchnässte Nächte durchs Studium begleitet. Danke fürs Ausleihen, Phillip.
Ok, just finished reading this book, well, I agree with those majority of readers that this book is "must read" for every Scala dev. Even it is written by creator of Scala, the guy with pure and strong scientific and theoretical background, the book is read quite easy, trust me, I am a C++ dev, I've read corresponding C++ Stroustrup's bible, it is nightmare, this Scala book is just a teenage comics comparatively to C++ sibling book.
Scala is probably the worst programming language I've had the misfortune to use. The syntax and the way the compiler works make it feel like a rushed experiment. This book either flaunts the flaws of the language, or jokingly dismisses them. If you're forced to program in Scala, don't buy this book. I hear "Scala for the Impatient." is better, but best of all just try to avoid it altogether.
Occasionally, it felt like the authors were showing off their cool programs (a layout framework to draw ASCII spirals and a circuit simulation) instead of discussing the Scala language.
I really love Scala. It mixes between object-oriented programming and functional programming with nice touches regarding type parameterization, generic and context parameters. Given a sheer amount of new syntax, I guess it would be a difficult language to master. Nonetheless, I think Scala definitely is a good language to learn. Somehow I got the feeling that Scala is more approachable than Rust although in some degrees both languages seems to hard for layman. I sometimes got headache while reading Rust books despite many attempts to learn this language.
The book itself is well organized, has good pacing and a variety of useful examples. It's nice when the authors tell you when to skip certain parts of the book because of its theoretical discussion. I got hooked immediately after the first few chapters and couldn't put it down. The language itself is a new treasure island to explore and the book is a whole new expenditure.
Here are some chapters I thoroughly enjoy:
- Givens. - Type Parameterization. - Pattern Matching. - Control Abstraction. - Functions and Closures.
An excellent book for learning Scala, with a good balance between depth and approachability. The examples and the issues raised are interesting and illustrative, and the organization is sound, interleaving chapters with an object-oriented and functional focus.
I would have liked to have some solved exercises so that I could test my understanding on the go. It would have been enough with a more clear statement of what features the developed examples were going to have.
The edition I read (3rd) is also apparently outdated on some aspects (at least, some of the examples raise deprecation warnings), but it seems like that is solved in more recent versions of the book.
Programming in Scala is a very thorough introduction to the Scala programming language. It shows you the basics you'll find in any language as well as all the details that make Scala special in great detail.
The examples are very concise and are great to demonstrate new concepts. On a more critical note, the object oriented part could have received a little less attention while the more functional approach could have received more.
For a total Scala beginner I would advise a short book like A Beginner's Guide to Scala Object Orientation and Functional Programming by John Hunt. After reading that book,Programming in Scala was much more accessible to me.
I highly recommend reading it. I have read this book after about a year of using Scala in my daily programming job and I have still learned a lot. What is funny more about the syntax in the first few chapters. This book is a tutorial but it gives you insight into decisions that need to be made while designing and implementing a programming language. You can also learn how some features were intended to be used, as seen by language authors. It is a long read but with click after a click you will eventually get to the end and you will have a sense of satisfaction.
Comprehensive and complete, but personally I tend to prefer more in the way of hands on exercises to learn a new language, where this book provided more of an API / language architecture overview. I came out finding that I felt I knew the parts of the language, but not yet how to practically use them. I'd recommend it to anyone serious about Scala, but if you're like me, you'll also want some supporting additional reading to fill in the practical gaps.
Pretty nice book about Scala...well explained...however...it really didn't fit with me...I feel it kinda rigid and not casual...good reference but prefer a different writing style...
I know...it's a programming book not a novel...but still...and yes...I know...it was written by Scala's author...but still...not my first choice for a Scala book...
Nice intro to Scala. Especially the discussion of case classes and pattern matching was better than most of the on-line materials. The coverage of concurrency could have been better (the examples didn't really show how to deal with threads in asynchronous scenarios). A nice bonus: this book improved my knowledge and understanding of Java.
This a very well structured guide throughout basic and more advanced features of Scala, gradually introducing more and more complex topics.
I particularly liked the fact that many of the included examples were of somewhat higher complexity, for example, a 2D text layout library. I think it helps to engage with the material better.