I learned a little bit of Haskell many years ago, and now I want to read a book to relearn it. I’m comfortable with functional programming from recent work in OCaml and Clojure.
Real World Haskell is appealing, but it’s now twelve years old. How much has changed from what’s described in that book? I’m willing to use a book that’s out of date in some ways–i can adjust to changes to the language and standard libraries–but I’d rather have less adjusting to do, so I’m wondering if I’d be better off looking at some of the books with more recent publication dates.
It is definitely out of date, but I can’t agree more with @vmchale. If I remember correctly, the only very noticeable item was the fact that at the time Applicative was not a superclass of Monad. There is liberal use of the liftM* functions, when idiomatic Haskell today would likely use the pure and <*>. I think it continues to be a wonderful resource.
P.S. Some of the source code no longer compiles, but I have my reservations that it ever did.
I used RWH as my first Haskell book; and yes it was out of date even back then. But I treated that as a challenge, and surprisingly, in most cases, I found the parts that were out of date, made me research the topic at hand more, and dig deeper. In the end, I learnt quite a bit more because of that experience.
Although I do understand it may appear frustrating to some.
It isn’t just RWH - every piece of documentation about Haskell is out of date in some ways. In a way, it reminds me of the time before Haskell 98 arrived, when academics and educators were often caught out by changes between versions of the language.
Unfortunately, the efforts put into establishing a new language standard (Haskell 2020) seems to have gone the way of the Mary Celeste. In the absence of the so-called “dead hand” of standards, we currently have this deluge of extension upon extension which erodes the accuracy of documentation.
Perhaps the best that can be achieved right now is the approach used by another evolving language: Rust - using RFCs and a measured release system (and centralised documentation) to steady the pace of progress…
Maybe it’s time to contemplate a stable educational variant/subset of Haskell (e.g. like the old Helium project) which the authors of textbooks and static online content can focus on with confidence - otherwise we may lose “mindshare” to e.g. a reinvigorated Miranda®. (The various Simple Haskell articles could be useful in such an endeavour.)
Otherwise (and given the unfortunate presence of “unsafe…” primitives in Haskell 2010), a renewed focus on making Haskell 98 the introductory path to the full “bells-whistles-and-claxons” Haskell, complete with separate implementations and documentation (https://www.haskell98.org) may be the simplest option, for now.
“Slowly” can work - A separate educational implementation (with the same licencing as GHC) could be constructed from GHC as a prototype, the aim being to bootstrap an “Helium-in-Helium” implementation (also with GHC-style licencing).
The main (only?) reason I mentioned Helium was its absence of type classes, similar to Miranda® - given the endurance of Miranda®, an educational Helium implementation definitely has potential…