Book Review: Unix System Programming in OCaml

Is Unix System Programming by Xavier Leroy and Didier Rémy worth your time? This blog gives a brief description of what it is, to help you decide.

What is Unix System Programming

The authors cover the following the topics as part of system programming: 

You could develop a web server or mail server or for that matter develop any middle tier application in OCaml given that OCaml has support for all popular databases. It is not meant to be a replacement for C. It will not help you write a device driver for example.

Why OCaml

OCaml is not popular language although a few organizations like Jane Street use it commercially. Facebook uses OCaml in some of their applications. ReasonML which is a dialect of OCaml is used the development of web and mobile applications.

Most good academic institutions teach a functional programming like OCaml, F#, Scala, Haskell, SML or a variant of Lisp. Despite this, learning a functional programming language will stand stand you in good stead. It will give you an other view of addressing programming problems. All these languages are for the most part type inferred. OCaml, F#, Scala and SML are statically type while Lisp is dynamically typed.

Such languages are usually more succinct as compared to imperative languages like C/C++/C# although a lot of functional programming features have been added to C++/C# recently. Thus learning system programming in OCaml is easier because the sample code is much smaller.

Is it worth your time?

The document is helpful even if you are already familiar with Unix system programming but you want to brush up your OCaml skills or you want to write system software using OCaml. If you don’t know OCaml, then you will have some difficulty following the code. However if you already know SML or F# or Scala then Ocaml should be easy to pick up. The code used in the document is basic functional programming. You don’t have to deal with Continuation Passing Style or Functors; topics I found hard to grasp initially.

If you don’t know any functional programming language then it’s about time you learnt one.



About The Sunday Programmer

Joe is an experienced C++/C# developer on Windows. Currently looking out for an opening in C/C++ on Windows or Linux.
This entry was posted in Languages, Linux, OCaml, Software Engineering. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s