Book Wrap Up
As I mentioned in the Preface, I had a slow start learning Haskell because I tried to learn too much at one time. In this book I have attempted to show you a subset of Haskell that is sufficient to write interesting programs - a gentle introduction.
Haskell beginners often dislike the large error listings from the compiler. The correct attitude is to recognize that these error messages are there to help you. That is easier said than done, but try to be happy when the compiler points out an error - in the long run I find using Haskell’s fussy compiler saves me time and lets me refactor code knowing that if I miss something in my refactoring the compiler will immediately let me know what needs to be fixed.
The other thing that I hope you learned working through this book is how effective repl based programming is. Most code I write, unless it is very trivial, starts its life in a GHCi repl. When you are working with someone else’s Haskell code it is similarly useful to have their code loaded in a repl as you read.
I have been programming professionally for forty years and I use many programming languages. Once I worked my way through early difficulties using Haskell it has become a favorite programming language. I hope that you enjoy Haskell development as much as I do.
Using Haskell for Modern AI Applications
I have been working professionally in the field of Artificial Intelligence since 1982, and it has been interesting to see how different programming languages have been used in AI research and deployed applications. In order, I have personally used: Common Lisp, Prolog, then back to Common Lisp, C++, Java, and Python for AI research and development. As I write this in September 2024, the use of Large Language Models (LLMs) has dominated AI research and development for the last three years. As you saw earlier in the chapter Using the OpenAI Large Language Model APIs in Haskell, it is straight forward to utilize LLMs in Haskell applications. With Haskell’s repl-based development coding efficiency, type safety, generally high performance, I think that Haskell is well situated to be an effective application and glue language for building modern AI applications.