Advanced Search
Start Your Free Trial

Overview

This easy-to-use, fast-moving tutorial introduces you to functional programming with Haskell. You'll learn how to use Haskell in a variety of practical ways, from short scripts to large and demanding applications. Real World Haskell takes you through the basics of functional programming at a brisk pace, and then helps you increase your understanding of Haskell in real-world issues like I/O, performance, dealing with data, concurrency, and more as you move through each chapter. With this book, you will:

  • Understand the differences between procedural and functional programming

  • Learn the features of Haskell, and how to use it to develop useful programs

  • Interact with filesystems, databases, and network services

  • Write solid code with automated tests, code coverage, and error handling

  • Harness the power of multicore systems via concurrent and parallel programming

You'll find plenty of hands-on exercises, along with examples of real Haskell programs that you can modify, compile, and run. Whether or not you've used a functional language before, if you want to understand why Haskell is coming into its own as a practical language in so many major organizations, Real World Haskell is the best place to start.

Amazon.com® Reader Reviews (Ranked by Helpfulness)

Average Amazon.com® Rating: 4.5 out of 5 rating Based on 22 Ratings

Better than others, but still not good enough - 2009-08-14
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Haskell books are in general among the worst I have seen for any programming language, which is really a pity for such an interesting language. I was really excited when I got this book because of all the good reviews, so I thought I would finally understand what a monad is and learn how to make practical programs.

I would like to mention that I have been a C++ programmer, currently work at a research institution, and my main tool at work is now Modelica: I think I am not completely dense and have experience with different programming paradigms, so I suppose my problems may not be limited to me.

Having read The Craft of Functional Programming, I had some background on the first chapters, which sail along nicely on their own; map, filter, fold, partial application and type classes are really nice and well explained.

There are entire chapters dedicated to case studies, in which the authors clearly favoured quantity versus quality: these example chapters are long-winded, nebulous and downright boring. JSON data? Parsers for some godforsaken image format? The authors clearly ignored the basic fact that examples need to be simple to be pedagogical, and lost themselves in details instead. Which would be tolerable if the case-study chapters could be skipped, but new stuff is introduced in these, so one has to follow through.

The coding style is mediocre: as unfortunately common in Haskell textbooks and resources, variables are often identified with single letters, originating cryptic code. It appears that the authors of those code snippets never wrote production code (i.e. code that has to be maintained down the road, possibly by others), given the total lack of semantics; if they did, someone now maintaining their code must be hating their guts. An argument should be named "state", "name", "address", "previous", not "x", "y", "z". In other cases, the choice of function or argument names is plainly misleading, such as in the case of the parser examples.
A terrible quote (approximately): "A SimpleState is actually a state extractor ..." so what about naming it "StateExtractor", instead of ending up with a bunch of misleading function signatures? Were their fingertips hurting, or did they want to save ink?

However, as customary for Haskell documentation, the worst comes with monads. Introduced early because of the IO monad, which is necessary for basic I/O operations, they are however left unexplained until chapter 14, during which time the reader is left to wonder what they are.
The usual foggy buzzwords are then thrown unsystematically around: "side effects" (what side effects could the Maybe data type or lists have? Yet they are monads), "actions", messy function specifications, confusing "examples" that raise more questions than they address.

I tried hard to wrap my brain around these concepts, I read and re-read the relevant chapters at various time over a month, but in the end I threw the book into the recycle bin - at some point I had to cut my losses. I stress this is the first time ever I throw a book away. Well, actually the second, because the first time I threw it away I recovered it because I got a bad conscience about it.

Sorry if I sound bitter, but I am really angry at myself for wasting so much time and effort for a language that will however never be of any practical use. Now, I'll rather learn Python, thankyouverymuch.

Good for a first draft and especially for a Functional Programming book - 2009-05-01
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
RWH is a solid book that gives the read a good idea of how Haskell works and why its unique. The book has its fault, largely because its a first draft that tries to cover a LOT of material. Don Stewart however has actively tried to aid in any deficiencies found by fixing errors on the web-version of this book so I'm not bothered by errors or things left out in the book.

The biggest complaint people have is that it tends to introduce concepts without really ever mentioning why something is being done. On one hand I agree with that assessment, however I also think that the book was marketed somewhat improperly. I would not call this book a good book for a beginner or your average intermediate programmer. At the very least I would say this book is better suited for experienced programmers or intermediate programmers with a passion for learning about languages.

That said, of the Functional Programming books I own, this is one of the best and most practical. It does not require a doctorate in Denotational Semantics to understand and it does not burn the first half of the book on typed/untyped lambda calculi (not that these things aren't important).

In short, if you want to get down to business working with a functional language, you have some experience with programming and are comfortable with a few errors then this book is for you.

Good Book for those stepping into the Haskell world - 2009-05-28
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Real World Haskell is very ambitious in its scope. It tries to gradually introduce the Haskell way of doing things such that even someone coming from an imperative programming background can follow.

As a consequence some concepts are not formally explained until later in the book, like Monads. Instead the book shows you how to use Haskell's I/O facilities, without an understanding of Monads, first.

For some this approach is probably very practical but I found myself at times wanting the material to be presented in a different order.

However, I am still giving this book 5 stars because of the sheer breadth and quality of the content and examples. And the later chapters really do tie all the concepts together with some non-trivial examples.

The first four chapters and chapter six lay the foundation for the rest of the book. I found that a good understanding of this material was crucial for later chapters, where they combine different features of the language in more complicated ways.

After that I was particularly fond of chapters 10, 13,14, 15, 16, 18, and 26, as these chapters explained some of the more advanced concepts I was interested in like Monads, Parsing, and Functional Data Structures.

Overall, I learned a ton of new things from reading this book
even thought the material is quite challenging in places,
and found myself wondering why more people don't use Haskell.

Rich with info, but VERY uneven - 2009-10-17
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
The good news is, this is probably the best Haskell book yet. The bad news is, it's still a frustratingly confusing jumble. It starts out well, introducing expressions, type inference, recursion, pattern matching, algebraic types, and higher order functions, with an emphasis on maps and folds (the way real world Haskell code is actually written), and it contains exercises that range from simple to challenging. The first four chapters alone are worth the price.

Unfortunately, the problems start in chapter 5, and rarely let up. It starts by introducing a datatype for JSON data for the purpose of pretty-printing it. The way the pretty-printer is rolled out is confusing -- it constantly jumps between code snippets that won't even compile, because a type they depend on is not defined til nearly the end of the chapter. And while it stays away from excessive cleverness, function names are confusingly named. In fact the entire nature of the pretty-printer revolves around a "Doc" abstraction that is never clearly explained or rationalized.

Later chapters are also rich with useful information, such as explanations of various GHC language extensions to the type system (which are really de facto standard Haskell nowadays). Unfortunately (there are many "unfortunatelys" to use in this review) I would never have been able to follow these explanations had I not already known a little about them -- unlike the rest of the examples in the book, the examples stop being "real-world" and instead devolve into meaningless metasyntax like "Foo" and "Bar".

By the time monads are finally introduced (late, but rightly so -- I consider this delay in introducing them to be a plus), the reader has had to suffer through some very tedious projects, such as parsing an obscure binary format. The book really begins to redeem itself again here, and makes monads clear as a datatype that captures common concepts of encapsulating and sequencing, and completely avoids cutesy visual analogies (no spacesuits or toxic waste here!).

I've not finished the book (I'm still in Chapter 14) but I am eagerly looking forward to its later chapters introducing monad transformers, parallel programming, and software transactional memory. You get a lot of book for the price, but you'll need the support of the always-friendly haskell community on IRC or email to make the most of this tome, or even make any sense of several parts of it.

Excellent in Every Way - 2009-06-29
Reviewer Rating: 1 star rating2 star rating3 star rating4 star rating5 star rating
Great seller! Very prompt with delivery and product arrived just as described. Highly recommend doing business with this seller. Thank you!

Some information on this page was provided using data from Amazon.com®. View at Amazon >


About Safari Books Online • Terms of Service • Privacy Policy • Contact Us • Corporate Licenses • Help • Accessibility | See us on FacebookSee us on Linked InSee us on TwitterRSS

Copyright 2009 Safari Books Online. All rights reserved.