Å·±¦ÓéÀÖ

Jump to ratings and reviews
Rate this book

Scala with Cats

Rate this book
The main goal of this book is to teach system architecture and design using the techniques of modern functional programming. This means designing systems as small composable units, expressing constraints and interactions via the type system, and using composition to guide the construction of large systems in a way that maintains the original architectural vision.

The book also serves as an introduction to the Cats library. We use abstractions from Cats, and we explain the structure of Cats so you can use it without fear in your own code base. The broad ideas are not specific to Cats, but Cats provides an excellent implementation that is beneficial to learn in its own right.

327 pages, ebook

Published November 20, 2017

15 people are currently reading
200 people want to read

About the author

Noel Welsh

3Ìýbooks9Ìýfollowers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
56 (44%)
4 stars
56 (44%)
3 stars
10 (8%)
2 stars
2 (1%)
1 star
1 (<1%)
Displaying 1 - 18 of 18 reviews
Profile Image for Anton Onyshchenko.
4 reviews2 followers
January 7, 2018
This is an FP beginner friendly book that provides a good overview of different typeclasses and monads implemented in the Cats library. It's very practical and easy to read.
Profile Image for Alex.
49 reviews5 followers
February 10, 2017
The best introductory book i have seen so far on FP and its usage in Scala.

Very well structured and thought out, aimed at readers with minimal exposure to formal Category Theory and intended to get you using what you learned in practice as soon as possible.

Each concept is summarized first, by a short sentence aimed at its usage, a summary picture, followed by an example implementation in simplified Cats for that concept and more examples, using the Cats library as well as excercises (with solutions at the end of the book).

Laws are explained, where applicable, and naming differences to Haskell and Scalaz are pointed out, and the summary often contains real-world usage examples where those Categories are used in context of distributed systems etc.

Most criticism i read so far is related to price per page of the first edition (~172 pages).

When every other publisher throws 2000+ page CS books at you for the same price this may seem valid, especially if your goal is to make videos and selfies against a bookcase full of standard library copy-paste to impress collegues and future employers, though I sincerely hope the authors do not give in to this criticism and keep this book a concise intro and reference that it is now.

As for what could be improved - currently the book is still in early access, and epub is sadly broken, with missing links, pictures, and solution shortcuts not working (i.e. not usable in google play books, which is my hassle-free reader accross devices) - hence 4 stars.

The pdf and HTML versions are readable, though miss convenience, but were updated twice, since i bought it, with the last edition adding use-cases - effectively doubling the size of the book, which i have yet to review.

Comparing this book to FP in Scala (the red book) - this one seems to more cleanly divide implementation from concept, mostly due to Cats hiding the complexity, as well as showing practical examples which are easier to understand.

To be fair - the red book was a pioneering work, while Advanced Scala with Cats is newer and seems to include of lots of experience gathered by the authors on practical implementations since then - which, together with the excellent layout of the contents, makes this one my preference between the two, and the one i am going to recommend to colleagues for learning FP in Scala.
248 reviews
December 28, 2020
I gave this book 5 stars despite of its apparently limited scope. At a first glance, the declared purpose of the book is to present the Scala Cats library. For this reason, it doesn't seem to warrant 5 stars. However, as I started reading it, I noticed that the book actually delivers much more.

Using the Scala Cats library as a starting point, it provides a very useful introduction to functional programming in general. The language is very accessible. Additionally it offers exercises. Even more than that, each of the exercises has a detailed answer with explanations. Moreover, the book is rather short. It took me much less to read than other similar books on functional programming and to finish (most of) the exercises.

As such, I believe this is one of the better books to read after .
Profile Image for Annette.
38 reviews3 followers
January 5, 2020
Amazing resource for advanced Scala for those who want to dive in deeper in functional programming patterns and practices. I would not suggest this book to someone who is only starting with functional programming - I feel like this is a perfect book for someone who:
a. has worked with Scala 1 year + in production
b. has seen implicits in production code
c. has a rough idea of type classes (as in, what they do, not how to implement them)
d. read up on monads, applicatives, semigroups, monoids etc. before and understands them a little bit more, beyond a "wrapper" analogy.

Great resource!

4/5 - I felt like some examples were very over engineered and I wouldn't write code like this in prod. This could also be my lack of hardcore FP coding experience :)

Big time recommended!
Profile Image for David Castillo.
49 reviews2 followers
March 30, 2018
This book is a very good reference if you're developing a project using Cats, or you're thinking about using it.
After reading it, I think of it as an enhanced Cats documentation, with clear examples for the most popular stuff, its implementation, as well as basic usage.
It's better if you already have an understanding of monads and functors, which you can develop by reading other books like Debashish Gosh's Functional and Reactive Domain Modeling.
Profile Image for Lori.
348 reviews66 followers
April 9, 2018
This is a reification of the ideal book on cats. Well paced, relevant exercises and a pleasure to read.

As an avid functional programming advocate, I do think that you have not learned Scala until you've actually understood and written purely functional code. Unfortunately doing that without libraries like cats or scalaz is impossible, therefore having to learn one of these is almost imperative (pun intended) for any *true* Scala programmer.

By reading this book you gain solid knowledge about the library itself and how to use it, and intuitive knowledge about the underlying category theory. Probably the next step after this is to pick up Bartosz Milewski's "Category Theory for Programmers" and get those thoughts rolling in on computational effects.
Profile Image for Enrique.
11 reviews
January 8, 2018
a must for every scala developer who wants to write functional code (just using map and flatMap does not mean you are writing functional code ;)

this books explain in a brief and practical way the basics of Category Theory and how to apply it in real life by using scala/cats

each chapter comes with practical examples and exercises (with solutions) to make you understand better the concepts and the Cats implementations of them (semigroups, monoids, functors, monads, etc..)

after the theory and exercises it comes with case studies which represent real life problems of a developer

the only thing i would improve is to maybe get just a little bit deeper into the theory and to extend (much more) the applicatives section
Profile Image for Miguel.
106 reviews6 followers
July 30, 2017
Very hyped in the Scala/Cats community and with due credit. However it wasn't the panacea I was looking for in learning cats.

Saying that, I do recommend it as a companion to the cats documentation. This book pre-dates the documentation so I should be easier on it since it was hyped at a time when the documentation for cats was non-existent. After reading this I understand cats fairly well but it required multiple youtube videos and readings of the docs.
Profile Image for Helio.
15 reviews3 followers
November 25, 2017
The author combines two points here: theorical introduction to Type Classes and how to apply them using Cats. For the first one, I'd say its a good complementary content to functors, monad transformers, applicatives and traversable, yet it doesn't cover any of these topics in depth.

So, if you have some understanding of these topics and want to learn how to using them in Cats, go for it.
Profile Image for Marcin Kuthan.
14 reviews10 followers
February 11, 2023
I recommend this book if you are a Scala developer and want to learn functional abstractions. Useful even if you don't intend to write a single line using the Cats library. I highly recommend solving the exercises presented in the book during the lecture. I found many times that everything was clear when I was reading a book but I really stuck when I started coding.
Profile Image for Aleksei.
39 reviews
November 2, 2023
The books works just fine, especially if one does know quite a bit of Haskell: then the book would works just as a good syntax refresher (that's how it worked for me). For someone who didn't see all this F/A/M stuff earlier "SWC" may look too terse but in that case the reader definitely should meditate with provided exercises - they are good enough, IMHO.
Profile Image for ´³Ã©°ùé³¾¾±±ð.
8 reviews3 followers
March 24, 2019
I liked it! This book is a nice, gentle (well, as gentle as can be when using Scala as your base language...), and practical intro to using category theory constructs with Cats in Scala.

There's plenty of exercises throughout the chapters so no time to get bored.
Profile Image for Anil Thaplar.
18 reviews3 followers
June 5, 2019
This is a good 2nd book on FP you may want to read. Focus is on well know FP abstractions like monads, applicatives, foldable etc without giving theory of discovering them (approach of red book). In a way this is more pragmatic book on applying FP.
Profile Image for arity.
94 reviews10 followers
July 22, 2019
Great book for those who starts with functional programming.
Profile Image for Felipe.
12 reviews
July 23, 2019
Good introduction to monads and pure FP for scala developers, they made the concepts easy to grasp with good exercises.
Profile Image for Peter Perhac.
118 reviews20 followers
March 16, 2017
"Scala with Cats: The good parts" or "Cats: The missing manual" A book that will never be quite finished as the world of functional programming with Scala and Cats is rapidly changing as popularity of these two increases. I enjoyed reading this e-book, although I expected even a little bit more in-depth explanations of individual concepts. There's plenty of exercises (with solutions) in the book, which is good, but I would prefer the balance of explanation-to-exercise be more on the side of explanation.
Profile Image for Bugzmanov.
230 reviews89 followers
July 14, 2016
I know that this is work in progress and content might change in future. but as april 2016, the "book" is ~80 pages long (without apendixes and table of contents) and really doesn't worth 50$.

If you read these two
/book/show/1...
/book/show/2...

you won't learn anything from "advanced scala" except cats api
Displaying 1 - 18 of 18 reviews

Can't find what you're looking for?

Get help and learn more about the design.