Haskell in Depth
T**T
Just what I needed to advance my Haskell skills.
Many books that claim depth, focus too much on the esoteric. This book is a great combination of depth and practicality. He goes over topics that would actually be useful in real projects.
A**K
Haskell made pragmatic and accessible
Summary: this book is a must have for anyone serious about Haskell. It (along with "The Book of Monads" by Alejandro Serano Mena) are the top 2 books in my collection of Haskell books.There is currently a glut of beginner books on Haskell, but a paucity of books on using Haskell in the real world. This book fills that void, and even discusses tooling (many books go very light on such issues).In the interests of full disclosure, I should mention that I was acknowledged in this book; but I don't feel that impairs my ability to objectively review the book.I read an earlier draft of this book cover to cover and made many comments.(Now that the book has been published, I'm reading the paper copy cover to cover; currently I'm on page 190 out of 627 pages.)This book takes a refreshingly pragmatic approach that nicely demystifies Haskell.Vitaly is top notch at teaching and explaining difficult concepts. He understands Haskell very deeply and profoundly. And, he can explain extremely well (which is the true hallmark of depth of understanding). While reading this book, the proverbial lightbulb in your head will be lighting up often!For Vitaly, monads are about the functionality they offer; and he explains that functionality well, and why it is so incredibly helpful to programming. Vitaly's motivation of monads, applicatives, functors (etc.) is the best I've ever come across.Question: could this book be used as one's first book on Haskell?Answer: this book is so excellent and has such great exercises in it, I would suggest it as a first book to anyone who is serious about Haskell. If someone is new to Haskell, they might feel a bit overwhelmed; in which case this book could be supplemented by books like "Learn you a Haskell for Great Good" (Lipovaca) and books by Alejandro Serano Mena ("Practical Haskell" and "Beginning Haskell").It's almost impossible these days to do any serious work in Haskell without an understanding of monad stacks and transformers.This book provides the best presentation of that material I've ever seen.I mentioned to the book author (Vitaly) that monad stacks/transformers seem really complicated to me and introduce a certain noise that might make my algorithms less clear. I asked Vitaly what he thought about using custom (ad hoc) monads instead of monad stacks.Vitaly responded (edited slightly for readability): "The problem with custom monads is that they require too much boilerplate and are not reusable at all. Monad transformers solve this problem but they are complicated, you are right. Other approaches (like algebraic effects) are complicated too. The research is still going on. I think this is not an issue for the language itself. It's more about the design of applications developed in a functional style. That's why I tried to avoid deep discussions on that in the book.".That (above) response is a gold mine of pedagogy and worth reading and contemplating before and while reading Vitaly's book.My own feeling is that I really don't care about reusability; I only care about expressive clarity, and monad stacks (currently!) make me cringe; but I'm admittedly still very new to them at this point.Those interested in this issue will want to also read "The Book of Monads" (mentioned earlier in this review).If you really want to attain a deep understanding of Haskell, read Vitaly's book. If you also go through all the exercises in the book, you will likely have a deep understanding of Haskell and hopefully the comfort level to work a fulltime Haskell job.Conclusion: this book is a must have for anyone who is serious about Haskell. The exercises are well devised, interesting, and worthwhile. It's well written and full of deep insights. Highly recommended!
C**N
Fill in the gaps leading to advanced Haskell
I came to Haskell as a hobbyist a couple of years ago and managed to become competent at basic development through the excellent books Get Programming With Haskell (Manning) and Real World Haskell (O'Reilly). There were still a large number of areas commonly referenced in the community not touched on in these books or any others, that I see used in all kinds of libraries, such as GADTs and type-level programming. This book is getting me introduced to some of these advanced concepts, as well as giving me a taste of professional development processes, like program structure, testing techniques, logging, error handling, best practices for monad transformers, etc.All in all, this is a necessary addendum to Haskell's beginner literature with a mountain of information organized in one place. I've found the writing to be good and examples sufficient to learning each of the concepts.
P**H
A Mix of Good and Not So Good
I've been trying to self-study Haskell for some time now. I read "Programming in Haskell" by Hutton to get a n introduction to the language. I worked successfully through all of the exercises in that book. However, I have found that I need more knowledge to understand how people are actually using Haskell in practice. For that, I purchased the Kindle edition of "Haskell in Depth".My main motivation for purchasing this book was to learn about the State Monad, Monad Transformers, Metaprogramming, RankNTypes, GADTs, Kind, and other more advanced concepts.Part I (Chapters 1-3) helped cement my understanding of type classes and I really liked the approach the author takes to developing the radar and stock quotes applications - requirements->design->types->functions. Also, the introduction to various useful libraries (colonnade, cassava, blaze-html, etc.) from Hackage is valuable.Part II (Chapters 4-6) is a mix of topics. Chapter 4 covers structuring and naming modules and source files, packaging, and various tools. This is clear and very useful in practice. Chapter 5 covers Monads and this is where I start to have trouble. I'm lost trying to follow the discussion of MonadReader. I have a reasonable understanding of basic Monads with the use of the bind and sequence operators and also the syntactic sugar provided by the do notation, but the presentation of MonadReader isn't simple and detailed enough for me to follow. It looks like the following topic of MonadWriter will also be just as challenging. I think a little more detail would help here.I haven't progressed beyond chapter 5 yet. Perhaps I should skip ahead and not get stuck on MonadReader and MonadWriter.On Youtube, there is a presentation of Monads by Lars Brünjes titled "Plutus Pioneer Program - Iteration #2 - Lecture #4" which gives a very nice explanation of Monads using Maybe, Either, and Writer. That's the level of instruction in Haskell that I need.I like that this book is recent and has many of the concepts that I'd like to learn. Unfortunately, the coverage may not be tutorial enough from me to be able to grasp the more difficult concepts.Even after many years of existence, Haskell still feels like an advanced level academic research project for computer scientists. In the forward to this book, Simon Peyton Jones states '"Haskell has a low floor (anyone can learn elementary Haskell), but a stratospherically high "ceiling".' That appears to be true.
Trustpilot
1 month ago
1 month ago