Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
ML primer
Stansifer R., Prentice-Hall, Inc., Upper Saddle River, NJ, 1992. Type: Book (9780135617212)
Date Reviewed: Sep 1 1993

The ML functional programming language is becoming popular as a teaching tool as well as for general programming activities. This tutorial introduction to Standard ML (SML) concisely covers most of the aspects of SML.

The book contains nine chapters and several appendices. After the introduction, we start with the basics of SML: the interaction with the SML top-level loop, the predefined SML types, and common error messages issued by the compiler. Then value bindings are described, with some emphasis on the different categories of identifiers and on pattern matching. Two of the important features of SML are described in the next two chapters: functions (including higher-order and polymorphic functions) and user-defined data types. The book then describes SML’s exception handling mechanism. Before completing the description of SML with imperative features like references and input-output streams, the author devotes a chapter to the SML type discipline. The last chapter is concerned with the SML module system (structures and functors). The book ends with the type signature of predefined functions and data structures available in the SML-NJ implementation of SML. About 30 exercises are then proposed, followed by a glossary and an index. The book contains many examples, processed by an SML system that produced the compiler messages and printed the results of evaluations.

Unfortunately, the solutions to the exercises are not given. Solutions for at least the last ten exercises would have increased the number of realistic and complete examples and could be helpful, allowing the reader to compare his or her solution to the one given.

One example given in the book is a type synthesizer. Unfortunately, the example does not address the let polymorphism, which justifies the use of type variables in ML types. Without some knowledge of let typing, ML beginners often do not understand why their programs are refused by the compiler while being perfectly executable (that is, without runtime type errors). One could argue that this fact is explained by examples and remarks given in the rest of the book, but without polymorphism, this example type-checker addresses only simple typing of a small functional language and cannot be claimed to be an ML type-checker.

The weakest point of this book is the too short explanation of the SML module system (seven pages, including a four-page example). The module system is the most innovative feature of SML, and it deserves a more complete treatment. Important features such as sharing constraints and substructures are not even mentioned, and this omission is significant. On the other hand, the virtues of this book are its clarity and conciseness, which allow the reader to rapidly learn how to write simple programs in SML. The book is well written, contains almost no typographical errors, and has a complete index and a small glossary that will be useful for beginners.

Despite its incompleteness, and because of its conciseness, precision, and quality of writing, I recommend this book to students, programmers, and computer scientists who wish to learn the basics of programming in SML quickly. It will not fit the needs of people interested in modular programming in SML, however.

Reviewer:  Michel Mauny Review #: CR116414
Bookmark and Share
 
Ml (D.3.2 ... )
 
 
Data Types And Structures (D.3.3 ... )
 
 
Applicative (Functional) Programming (D.1.1 )
 
Would you recommend this review?
yes
no
Other reviews under "Ml": Date
Commentary on standard ML
Milner R. (ed), Tofte M. (ed), MIT Press, Cambridge, MA, 1991. Type: Book (9780262631372)
Jun 1 1992
The ML approach to the readable all-purpose language
Spooner C. ACM Transactions on Programming Languages and Systems 8(2): 215-243, 1986. Type: Article
Dec 1 1986
Elements of ML programming
Ullman J., Prentice-Hall, Inc., Upper Saddle River, NJ, 1994. Type: Book (9780131848542)
Jun 1 1995
more...

E-Mail This Printer-Friendly
Send Your Comments
Contact Us
Reproduction in whole or in part without permission is prohibited.   Copyright 1999-2024 ThinkLoud®
Terms of Use
| Privacy Policy