Smooth CoffeeScript
Effective CoffeeScript and the Beauty of Functional Programming



Book Details
Author | E. Hoigaard |
Published | 2011 |
Edition | 1st |
Paperback | 231 pages |
Language | English |
License | Creative Commons Attribution |
Book Description
CoffeeScript is a lucid evolution of JavaScript created by Jeremy Ashke-nas. Apart from the major change in explaining Coffee-Script instead of JavaScript, numerous other changes have been made andsections have been added, edited or removed. Everything that is expressed in this book is therefore solely the responsi-bility of the editor. In the sense of open source software, this book is afork.
The program examples in this book use a prelude file in addition to the CoffeeScript environment. It includes the Underscore functional library, the Coffeekup HTML markup, wsserver-side WebSockets andqc, a QuickCheck based testing library. These libraries extend CoffeeScript with useful abstractions and testing tools to keep focus on the task at hand instead of distracting boilerplate code.
While it is possible to express programs from a very small set of language primitives, it quickly becomes tedious and error prone to do so. The approach taken here is to include a broader set of functional building blocks as if they were a native part of the programming language. By thinking in terms of these higher level constructs more complex problems can be handled with less effort.
To ensure correctness testing is required. This is especially true when developing reusable algorithms in a dynamic and untyped language. By integrating QuickCheck style test cases as soon as functions are introduced,it is intended that writing tests and declaring assumptions become a seamless part of writing software.
This book is available under a Creative Commons Attribution license (CC BY), which means that you are free to copy, distribute, and modify it, as long as you give appropriate credit to the original author.
If you enjoyed the book and would like to support the author, you can purchase a printed copy (hardcover or paperback) from official retailers.