On December 13, 2009, Jeremy Ashkenas made the first Git commit of CoffeeScript with the comment: “initial commit of the mystery language.” The compiler was written in Ruby. On December 24, he made the first tagged and documented release, 0.1.0. On February 21, 2010, he committed version 0.5, which replaced the Ruby compiler with a self-hosting version in pure CoffeeScript. By that time the project had attracted several other contributors on GitHub, and was receiving over 300 page hits per day.
On December 24, 2010, Ashkenas announced the release of stable 1.0.0 to Hacker News, the site where the project was announced for the first time.
Almost everything is an expression in CoffeeScript, for example
if can also be written in
consequent if condition form.
Many unnecessary parentheses and braces can be omitted; for example, blocks of code can be denoted by indentation instead of braces, function calls are implicit, and object literals are often detected automatically.
- Source maps allow users to debug their CoffeeScript code directly, supporting CoffeeScript tracebacks on run time errors.
- CoffeeScript supports a form of Literate Programming, using the
.litcoffeefile extension. This allows CoffeeScript source code to be written in Markdown. The compiler will treat any indented blocks (Markdown’s way of indicating source code) as code, and ignore the rest as comments.
Iced CoffeeScript is a superset of CoffeeScript which adds two new keywords:
defer. These additions simplify asynchronous control flow, making the code to look more like a procedural programming language, eliminating the call-back chain. It can be used on the server side and in the browser.
GitHub’s internal style guide once said “write new JS in CoffeeScript”, and while it no longer does, all the advice in the style guide references how to write good CoffeeScript, and their Atom text editor was also written in the language.
Pixel Game Maker MV makes uses of CoffeeScript as part of its game development environment.
Above is a brief about CoffeeScript. Watch this space for more updates on the latest Trends in Technology.