Preface

Table of Contents

Who is this book for?
How to read this book

We use Haskell every day to solve problems that require programming. You can, too, and we're writing this book to show you how.

Why do we like Haskell? It provides a combination of abstraction and concreteness that let us address a wide range of problem sizes. When we have small problems to solve, we write short programs that would normally be considered the domain of “scripting” languages, because Haskell is expressive and has good standard libraries. When we need to write larger and more demanding applications, Haskell's robustness and composability help us to build maintainable code that we can adapt quickly to changes in circumstance.

Who is this book for?

We're writing this book for you, the curious programmer. We assume that you can already program in a language like Python, C, or Java, but that's as far as our assumptions about you go.

Actually, that's not quite complete. We have made a few more assumptions about you.

We assume that you're reading this book because you want to learn lots of interesting stuff, and to have fun, and occasionally to pump your fist and shout “Wow! I get it!

We assume that you are willing to put in some practice, to help a new idea or technique to “stick” in your mind.

But really, that's it for our assumptions about you. For example, your educational background isn't important. What is important is a willingness to explore new territory.

Maybe you've never used a functional language. No problem. We'll take you through the basics at a brisk pace, and we won't talk down to you.

If you have used some other functional language, we'll point out areas where an appropriate way of tackling a problem in a different language might lead you into trouble with Haskell.

How to read this book

We've put this book together so that each chapter builds on material we've covered in prior chapters. If you're unfamiliar with functional programming or Haskell, you should start at the beginning.

In every chapter, we've interlaced the material with exercises. We think that taking the time to solve them is a great idea, one that will pay you back hugely. Don't just think about how you would solve an exercise; sit in front of a computer and write working code!

We've written our examples as real Haskell programs that you can modify, compile and run. Some exercises will refer you to particular example programs that we'll ask you to change.

With exploration comes the risk of occasionally getting lost. We'll be trying to anticipate your questions as we go, but maybe once in a while we'll take a step a little too quickly. Any time you feel like you're not quite getting it yet, relax. Pretty often your best approach will be to try a few coding exercises, to explore a topic where we didn't make things clear enough. Nothing will help you learn better than practice and a willingness to try a few different ways around an obstacle.

We have a few important non-goals in writing this book. The first is that we're not triumphalists; when we say nice things about functional programming, we're not implicitly saying bad things about someone else's cherished way of getting things done.

We will not sugar-coat problem topics. No language is perfect; neither is any language's standard library. When we cover aspects of the language or libraries that are less than perfect, we'll be clear about what the limitations are.

Want to stay up to date? Subscribe to the comment feed for this chapter, or the entire book.

Copyright 2007 Bryan O'Sullivan, Don Stewart, and John Goerzen. This work is licensed under a Creative Commons Attribution-Noncommercial 3.0 License. Icons by Paul Davey aka Mattahan.