cjiang (4) [Avatar] Offline
First of all, this is really an excellent book on advanced Scala. I am wondering if the author could include a chapter on design patterns, such as Cake pattern etc. to show the Scala way of handling common issues. Thanks.
kaos (12) [Avatar] Offline
Re: A possible chapter on design pattern
Thanks for your suggestion! The book is mostly done at this point, but that doesn't preclude further books on functional programming and Scala. Are there any other topics of interest that you would like to see covered?

Katharine Osborne
Developmental Editor
TheDet (49) [Avatar] Offline
Re: A possible chapter on design pattern
Hello Katharine,

indeed there are! For most of us former/current Java developers FP in its depth is a paradigm shift, not easy to grok.

A deeper understanding of the functional concepts in general and its implementation in Scala would be precious.
Everytime one wants to get deeper into more theoretical FP terms (Monads, Arrows, Functors and the like) there are always only links to some Haskell based papers.

I think a book covering those concepts, perhaps based on the scalaz library would be a good addition to the current available/in production bookshelf.


(PS: I make this statement without full knowledge of what will really be covered in Scala in Depth eventually).
joshua.suereth (60) [Avatar] Offline
Re: A possible chapter on design pattern
Hi cjiang!

While I do not have a specific chapter that covers design patterns, specifically Cake, I do cover several design patterns/paradigms throughout the book. In particular:

Chapter 2, the section on Option, covers Monadic approaches to dealing with data and functions. This will be more clear once Chapter 11 is released.

Chapter 4 covers "Composition can include Inheritance" which describes a design pattern akin to the Cake pattern that I find a bit more flexible for the same verbosity.

Chapter 7 covers "Type Classes" which can be considered an idiom in Scala.

Chapter 7 also covers type-level programming using natural numbers and recursion.

Chapter 9 (soon to be released) covers how to architect an Actors application to isolate failure zones and scheduling zones (i.e. isolating 'hanging' actors).

I also know I discuss the 'loaner' design pattern at some point, but don't remember the reference.

As for remaining design patterns, Katherine already described the situation accurately. I think Design patterns could encompass an entire book! I'll do my best to call-out the ones included in this book. You can expect a lot of FP idioms in Chapter 11. So far, we have Monads, Monoids, Functors and Applicative.

Hope that helps and thanks for the feedback!
cjiang (4) [Avatar] Offline
Re: A possible chapter on design pattern

Thank you for your reply. Expecting Chapter 11!

Thank you for this brilliant book.