Programming Books


Real World OCaml: Functional programming for the masses is an excellent guide to OCaml programming. A big feature here is that it covers many of the modern libraries for OCaml development. Following the related book for Haskell, Real World Haskell, RWO is organized around several small somewhat realistic examples (e.g., serializing and deserializing JSON, command-line parsing, serialization with S-expressions, echo server, and DuckDuckGo API searches). A big chunk of the book is dedicated to detailing compiler internals such as the garbage collector, camlp4, type inference, the module system, and code generation, which might not be as relevant to the average practicing programmer but is nonetheless quite edifying for all and helpful for a more thorough understanding of the OCaml infrastructure. One nitpick is the choice of the Async library for concurrent programming instead of the somewhat more popular Lwt library. Curiously, at least one author's main project has moved on to using Lwt. However, this is not a major issue since Async and Lwt look quite similar in practice (basically using monadic bind and return to provide an interface for async calls).


ML for the Working Programmer is one of the more comprehensive books on ML. It focuses on implementation of standard data structures and some functional ones (infinite data structures). There are two larger scale examples in the end of the book, a lambda-calculus interpreter and a tactic-based theorem prover. Due to its examples, it has a considerably more academic feel. Unfortunately, it is also somewhat dated at this point, but pretty much all it says still holds true, it is just that modern flavors of ML now have a bevy of new language features and design patterns.


Real World Haskell is one of the more comprehensive Haskell books out there. There is a reasonable treatment of type classes and monads which is more than can be said of other books that seek to be gentle introductions to the language. Moreover, Real World Haskell is quite pragmatic with sections on JSON, parsing using Parsec, foreign function interface to interoperate with C, database, web, concurrency, and even profiling.





1 comment:

  1. http://www.typedynamic.com/p/programming-books.html

    ReplyDelete

Note: Only a member of this blog may post a comment.