Preface

Table of Contents
The Audience
The Environment

This book is a study in system programming using the Standard ML language. (In the rest of the book this language will be referred to as SML). Standard ML is one of several languages in the ML family, the other main one being OCaml[OCaml], but this book concentrates on Standard ML and in particular the Standard ML of New Jersey (SML/NJ) implementation. I will revisit some related languages in the concluding chapter.

SML belongs to the class of functional programming languages. Functional languages are very high-level languages that are often thought of as academic curiosities, not up to the job of real-world programming. This book aims to show that functional languages, in particular SML, can be used for real-world programs.

The definition of system programming is a bit fuzzy. This book will only cover programming in the Unix operating system. In Unix, by system programming, I mean being able to write infrastructure programs such as daemons and utilities that interact with other programs, not necessarily directly with the user.

The Audience

I've seen many postings on Usenet news groups and mailing lists by programmers interested in using functional languages who have been unable to get very far due to the paucity of documentation and training material. What material on functional programming that is available tends to be either rather academic or only at an introductory level with small toy examples. This book aims at improving this situation by working through a project more typical of real-world programs. In addition there will be smaller examples in tutorial chapters.

The major project in this book is a web server. It is similar in functionality to the early CERN server. It supports CGI programming but only does the original HTTP 1.0 protocol.

You, dear reader, should be a programmer familiar with Unix programming using conventional languages such as C, C++ or Java. You have probably been introduced to functional programming at college and retained an interest in the subject but not had the opportunity to take it further. Microsoft Windows programmers with some familiarity with the Posix standards will benefit from this book too.

You should already have some familiarity with SML or other languages in the ML family, or enough familiarity with functional languages that you can pick up the language from a tutorial. This book is not a course on SML. There are a number of books available that teach programming in SML. There are also some tutorials available on the web. See Appendix A for more information on what's available.