- 出版社: Manning Publications; Pap/Psc (2017年3月28日)
- 平装: 320页
- 语种： 英语
- ISBN: 1617293431
- 条形码: 9781617293436
- 商品尺寸: 19 x 1.9 x 24.1 cm
- ASIN: 1617293431
- 用户评分: 分享我的评价
Nim in Action (英语) 平装 – 2017年3月28日
AUTHOR BIO Dominik Picheta is one of the main developers of the Nim programming language, he is also the author of the Nimble package manager as well as many other Nim tools.
|5 星 (0%)|
|4 星 (0%)|
|3 星 (0%)|
|2 星 (0%)|
|1 星 (0%)|
In the two-chapter "Basics of Nim" portion, Nim is introduced as "a general-purpose programming language " that emphasizes efficiency and expressiveness without ignoring elegance. "Applications written in Nim are very fast; in many cases, just as fast as applications written in C, and more than thirteen times faster than applications written in Python," notes the author, Dominik Picheta. :Efficiency is the highest priority, and some features make optimizing code easy. This goes hand in hand with a soft real-time garbage collector, which allows you to specify the amount of time that should be spent collecting memory. This feature becomes important during game development, where an ordinary garbage collector may slow down the rendering of frames on the screen if it uses too much time collecting memory."
Nim is a compiled language that compiles Nim source code into C, and then feeds that source code into a C compiler. Picheta's initial chapters emphasize that Nim is "usable for just about any software project." But he also notes that Nim is still a "young and immature" programming language, and the "user base and community" is still very small and offers few jobs. Yet interest in, and acceptance of, Nim are growing. And, another positive note: the development of open-source Nim remains "exceptionally open" to newcomers who want to help out. (By the way, Nim is not a beginner's language. To learn from this book, development experience in at least one other programming language is needed. And you should have some SQL experience, as well.)
The opening part of the book also covers Nim syntax, procedures, for loops and "other basic aspects of the language." Numerous short code examples are provided as how-to illustrations.
In Part 2, "Nim in practice," the focus is on "writing some software." A simple, yet functional chat application is presented, Nim's standard library is examined, package management is explained, the process of parallelism is explored, and a Twitter clone is developed and deployed.
In Part 3, Nim's foreign function interface is described. It provides the ability "to use libraries written in other programming languages." This part of the book also digs into metaprogramming and "the three different metaprogramming constructs in Nim: generics, templates, and macros. And the process for creating a domain specific language for configuration parsing also is examined.
Appendix A deals with how to get help from the Nim community via IRC and Gitter, online forums, and more direct methods. Appendix B focuses on installing Nim, emphasizing that the latest procedures need to be obtained from the nim-lang.org website, where the Nim code also can be downloaded.
"Nim in Action" is an excellent guide for learning the new and versatile Nim programming language. It is well written and efficiently illustrated. And it keeps its code examples compact and to the point.
My thanks to Manning Books for provided an advance reading copy for review.
I didn't give 5 stars, mainly because the coverage is certainly not complete - there might have been several chapters more - and because the book will become partly obsolete soon due to the evolution of the language. Nevertheless, I strongly recommend it ... today!