Category:CoffeeScript: Difference between revisions

From Rosetta Code
Content added Content deleted
m (Fix links)
m (Oh yeah it's a language...)
Line 1: Line 1:
'''CoffeeScript''' is a programming language that compiles to [[:Category:JavaScript|JavaScript]]. The language adds syntactic sugar inspired by [[:Category:Ruby|Ruby]] and [[:Category:Python|Python]] to enhance JavaScript's brevity and readability, as well as adding more sophisticated features like array comprehension and pattern matching.
{{language}}'''CoffeeScript''' is a programming language that compiles to [[:Category:JavaScript|JavaScript]]. The language adds syntactic sugar inspired by [[:Category:Ruby|Ruby]] and [[:Category:Python|Python]] to enhance JavaScript's brevity and readability, as well as adding more sophisticated features like array comprehension and pattern matching.


With 896 watchers and 68 forks (as of November 10, 2010), CoffeeScript is ranked as one of the "most interesting" projects on Github. [http://github.com/repositories] The language has a relatively large following in the Ruby community, and has been used in production by [http://thinkvitamin.com/mobile/new-rails-like-framework-from-37signals-for-html5-mobile-apps/ 37signals]. There have been reports that official support for CoffeeScript will be included in the next point release of Ruby on Rails. [http://www.hagenburger.net/TALKS/rails-3.1-frontend-performance.html]
With 896 watchers and 68 forks (as of November 10, 2010), CoffeeScript is ranked as one of the "most interesting" projects on Github. [http://github.com/repositories] The language has a relatively large following in the Ruby community, and has been used in production by [http://thinkvitamin.com/mobile/new-rails-like-framework-from-37signals-for-html5-mobile-apps/ 37signals]. There have been reports that official support for CoffeeScript will be included in the next point release of Ruby on Rails. [http://www.hagenburger.net/TALKS/rails-3.1-frontend-performance.html]

Revision as of 02:54, 1 December 2010

Language
CoffeeScript
This programming language may be used to instruct a computer to perform a task.
See Also:


Listed below are all of the tasks on Rosetta Code which have been solved using CoffeeScript.

CoffeeScript is a programming language that compiles to JavaScript. The language adds syntactic sugar inspired by Ruby and Python to enhance JavaScript's brevity and readability, as well as adding more sophisticated features like array comprehension and pattern matching.

With 896 watchers and 68 forks (as of November 10, 2010), CoffeeScript is ranked as one of the "most interesting" projects on Github. [1] The language has a relatively large following in the Ruby community, and has been used in production by 37signals. There have been reports that official support for CoffeeScript will be included in the next point release of Ruby on Rails. [2]

History

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 24th, 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 one written in pure CoffeeScript. By that time the project had attracted several other contributors on Github, and was receiving over 300 page hits per day.

As of November 2010, the language is still changing rapidly. According to CoffeeScript.org, it will become more stable when version 1.0 is released. Ashkenas has stated that the next release will be dubbed 0.9.9, and that he plans to make the 1.0 release before December 25th. [3]

Examples

A common JavaScript snippet using the jQuery library is

<lang javascript> $(document).ready(function() {

 // Initialization code goes here

}); </lang>

In CoffeeScript, the function keyword is replaced by the -> symbol, and indentation is used instead of curly braces (except when defining an associative array), as in Python. Also, parentheses can usually be omitted. Thus, the CoffeeScript equivalent of the snippet above is

<lang ruby> $(document).ready ->

 # Initialization code goes here

</lang>

Compiling

The CoffeeScript compiler has been written in CoffeeScript since version 0.5, and can be run either in the browser or through Node.js. The official site at CoffeeScript.org has a "Try CoffeeScript" button in the menu bar; clicking it opens a modal window in which you can enter CoffeeScript, see the JavaScript output, and run it directly in the browser.

Citations

  1. Github. "Interesting Repositories", Github, Nov 10, 2010.
  2. Carson, Ryan. "New Rails-like Framework from 37signals for HTML5 Mobile Apps", Think Vitamin blog, Nov 8, 2010.
  3. Hagenburger, Nico. "Rails 3.1 – A Sneak Preview", presentation for Railscamp Hamburg on Oct 23, 2010.
  4. Ashkenas, Jeremy. "The Plan for 1.0", Github issue tracker, Nov 4, 2010.

External links

Subcategories

This category has the following 3 subcategories, out of 3 total.

Pages in category "CoffeeScript"

The following 200 pages are in this category, out of 219 total.

(previous page) (next page)
(previous page) (next page)