Computing Reviews
Today's Issue Hot Topics Search Browse Recommended My Account Log In
Review Help
Search
Nim in action
Picheta D., Manning Publications Co., Shelter Island, NY, 2017. 320 pp. Type: Book (978-1-617293-43-6)
Date Reviewed: Jul 16 2018

Among the newer programming languages, Nim has managed to distinguish itself on its own merits without any corporate support. Andreas Rumpf released the first Nim compiler written in Nim (then known as Nimrod) in 2008. Nim is open source; both development and the future direction of Nim are driven by the user community.

Nim is a general-purpose imperative, multi-paradigm, statically typed programming language that borrows features from numerous other languages. It aims to be efficient, easy to understand, and easy to work with; it generates C or JavaScript code, so it is also portable. As of now, it still hasn’t reached release 1.0, which means that although the language core is believed to be stable, it has features that are evolving or being polished up (parallelism, for example) and features (such as concepts) that are clearly marked as experimental.

Nim is a language worth paying attention to. At this point Nim in action is the only book about Nim available in print; that makes it the go-to resource if you prefer to study from printed books rather than online.

This is a rather short book: 302 pages including index, plus 16 pages of introductory material. In such limited space, the book can only provide an introduction to the language. At least one section available online [1] was not included in the book due to size constraints. But I do not mean to denigrate the length of the book; in fact, many readers will appreciate a rather quick overview of Nim, leaving additional details for later. With this in mind, Picheta points to further online documentation as he goes along. Plus, he highlights some differences and similarities with other languages. Readers need to be familiar with at least one other programming language.

The book contains nine chapters; a detailed table of contents is available through Amazon. Here I will mention some highlights. Chapter 3 demonstrates Nim by building a command-line-driven asynchronous chat application using sockets. Chapter 4 provides a quick overview of the Nim standard library, which is still being fleshed out. Chapter 5 introduces Nimble, the Nim package manager. Chapter 6 introduces Nim parallelism using threads; I found this to be one of the most interesting parts of the book. Chapter 7 builds a Twitter clone; this demonstrates using Nim to develop and deploy a web application. Chapter 8 shows how to use C or JavaScript libraries with Nim. Chapter 9 deals with metaprogramming. It introduces generics, templates, and macros, and it shows how to use them to build a very simple domain-specific language that uses a configuration file to assign port numbers to web addresses.

I was left with two nagging impressions. First, I was very disappointed that the book did not discuss using Nim for functional programming. Also, I felt that the relationship between macros and the internal Nim abstract syntax tree needed greater elaboration. Unless you are familiar with macros from other languages, you will not fully appreciate their deep and powerful potential from this book alone.

The source code, shown as is customary in a fixed-length font, is very clear. Comments, in a smaller variable-length bold font, are shown around the source code, with arrows pointing to the relevant line or section in the code. That makes the code less cluttered and easier to understand. This is an extremely effective technique, which I would like to see used more often in other programming books.

The index is very good; there are no references. Since this is a book for self-study rather than a textbook, there are neither questions nor exercises.

On the other hand, the writing is uninspired: it attempts to be enthusiastic; however, it calls attention to itself by, among other things, using too many exclamation points and attempts at blatant humor, which invariably fall flat.

Nim is a very interesting language; I enjoyed looking into it. This book can get you started.

More reviews about this item: Amazon, Goodreads

Reviewer:  Edgar R. Chavez Review #: CR146151 (1809-0474)
1) Picheta,D. A guide to documenting, profiling and debugging Nim code https://nim-lang.org/blog/2017/10/02/documenting-profiling-and-debugging-nim-code.html (06/19/2018).
Bookmark and Share
  Reviewer Selected
Featured Reviewer
 
 
General (D.1.0 )
 
 
Language Classifications (D.3.2 )
 
 
Language Constructs and Features (D.3.3 )
 
Would you recommend this review?
yes
no
Other reviews under "General": Date
Problems in programming
Vitek A., Tvrdy I., Reinhardt R., Mohar B. (ed), Martinec M., Dolenc T., Batagelj V. (ed), John Wiley & Sons, Inc., New York, NY, 1991. Type: Book (9780471930174)
Aug 1 1992
KNOs: KNowledge acquisition, dissemination, and manipulation Objects
Tsichritzis D., Fiume E., Gibbs S., Nierstrasz O. ACM Transactions on Information Systems 5(1): 96-112, 1987. Type: Article
Nov 1 1987
Programmer perceptions of productivity and programming tools
Hanson S. (ed), Rosinski R. Communications of the ACM 28(2): 180-189, 1985. Type: Article
Jul 1 1985
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