CoffeeScript
CoffeeScript | |
---|---|
Basic data | |
Publishing year: | 2009 |
Designer: | Jeremy Ashkenas |
Developer: | Jeremy Ashkenas |
Current version | 2.5.1 (January 31, 2020) |
Typing : | weak , dynamic |
Influenced by: | JavaScript , Ruby , Perl , Python , Haskell , YAML |
Affected: | MoonScript , LiveScript |
Operating system : | platform independent |
License : | MIT license |
coffeescript.org |
CoffeeScript is a programming language whose programs are transcompiled into JavaScript . It has been developed by Jeremy Ashkenas since 2009.
Origin and use
Based on Ruby , Python and Haskell , CoffeeScript uses syntactic sugar to improve JavaScript's readability and conciseness. CoffeeScript also provides additional functionality, such as B. Array summarization and pattern matching . CoffeeScript translates predictably into JavaScript, programs can be written more compactly (typically 30% fewer program lines) without affecting runtime performance.
CoffeeScript is also the official JavaScript preprocessor for Ruby on Rails .
Due to the visually simplified syntax, the language is particularly popular with programming beginners or designer frameworks such as B. Framer.js insert.
Code example
The following source text outputs "Hello World".
alert "Hallo Welt"
Transcompiled to JavaScript.
alert("Hallo Welt");
Compilation
The CoffeeScript compiler from version 0.5 is written in CoffeeScript itself and is available for Node.js. However, the compiler is not dependent on Node and can be executed in almost any JavaScript environment.
literature
- Trevor Burnham: CoffeeScript: Accelerated JavaScript Development . Pragmatic Programmers, 2011, ISBN 978-1-934356-78-4 .
- Andreas Schubert: CoffeeScript - The alternative to JavaScript - a compact introduction . dpunkt.verlag, 2014, ISBN 978-3-86490-050-1 .
Web links
- Official website
- CoffeeScript on GitHub
- Geoffrey Grosenbach, Jeremy Ashkenas, Michael Ficarra: Meet CoffeeScript . PeepCode. May 12. Retrieved October 5, 2011.
- CoffeeScript Cookbook , collection of scripts
- The Little Book on CoffeeScript . - small web instructions
- Smooth CoffeeScript (PDF; 2.0 MB) Small booklet on CoffeeScript
Individual evidence
- ↑ Release 2.5.1 . January 31, 2020 (accessed February 1, 2020).
- ↑ Interview with Jeremy Ashkenas. (No longer available online.) Read Write Hack, archived from the original on May 19, 2012 ; Retrieved December 4, 2011 . Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice.
- ^ Introducing CoffeeScript. Linux Journal, accessed December 4, 2011 .
- ↑ jashkenas.github.com ( Memento of the original from December 27, 2009 in the Internet Archive ) Info: The archive link was automatically inserted and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice.
- ↑ CoffeeScript is a little language that compiles into JavaScript / Installation. (No longer available online.) Jashkenas.github.com, archived from the original on December 27, 2009 ; accessed on December 4, 2011 . Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice.