PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

CoffeeScript

CoffeeScript

CoffeeScript is a pl created in 2009 by Jeremy Ashkenas.

#69on PLDB 13Years Old 23.3kUsers
17Books 0Papers 65kRepos

Try now: Riju · TIO · Replit

CoffeeScript is a programming language that transcompiles to JavaScript. It adds syntactic sugar inspired by Ruby, Python and Haskell in an effort to enhance JavaScript's brevity and readability. Specific additional features include list comprehension and pattern matching. Read more on Wikipedia...


Example from Riju:
console.log "Hello, world!"
Example from hello-world:
alert "Hello World"
Example from the Hello World Collection:
// Hello world in CoffeeScript alert "Hello, World!"
Example from Linguist:
console.log "Hello, World!"
Example from Wikipedia:
author = "Wittgenstein" quote = "A picture is a fact. -- #{ author }" sentence = "#{ 22 / 7 } is a decent approximation of π"

Keywords in CoffeeScript

and or is isnt not on yes @ no off true false null this new delete typeof in instanceof return throw break continue debugger if else switch for while do try catch finally class extends super undefined then unless until loop of by when

Language features

Feature Supported Example Token
Integers
# [0-9]+
Floats
# [0-9][0-9]*\.[0-9]+([eE][0-9]+)?[fd]?
Hexadecimals
# 0x[0-9a-fA-F]+
Conditionals
Inheritance
Switch Statements
Exceptions
Classes
While Loops
Booleans true false
Regular Expression Syntax Sugar
Strings "
MultiLine Comments
### A comment
###
###
Print() Debugging console.log
Line Comments
# A comment
#
Semantic Indentation
Comments

Books about CoffeeScript on goodreads

title author year reviews ratings rating
Programming in CoffeeScript (Developer's Library) Mark Bates 2012 2 22 3.50
Coffeescript Programming with Jquery, Rails, and Node.Js Michael Erasmus 2012 2 10 3.50
Programming in Coffeescript Mark Bates 2012 0 0 0.0
Programming in Coffeescript Mark Bates 2012 0 0 0.0

Books about CoffeeScript from ISBNdb

title authors year publisher
CoffeeScript Application Development Young, Ian 2013 Packt Publishing
CoffeeScript in Action Patrick Lee 2014 Manning
CoffeeScript Programming with jQuery, Rails, and Node.js Erasmus, Michael 2012 Packt Publishing
CoffeeScript Programming with jQuery, Rails, and Node.js Michael Erasmus 2012-12-13 Packt Publishing
Programming in CoffeeScript (Developer's Library) Bates, Mark 2012 Addison-Wesley Professional
CoffeeScript Application Development Cookbook Hatfield, Mike 2015 Packt Publishing
Programming in CoffeeScript (Developer's Library) Bates, Mark 2012 Addison-Wesley Professional
Smashing CoffeeScript Hudson, Alex 2013 Wiley
Jump Start CoffeeScript Earle Castledine 20121128 O'Reilly Media, Inc.
CoffeeScript in Action Patrick Lee 20140508 Simon & Schuster
Jump Start CoffeeScript Earle Castledine 20121128 O'Reilly Media, Inc.
The Little Book on CoffeeScript Alex MacCaw 20120119 O'Reilly Media, Inc.
The Little Book on CoffeeScript Alex MacCaw 20120119 O'Reilly Media, Inc.
eiffel.html · coffeescript.html · powerpc.html

View source

PLDB - Build the next great programming language · v2022 · Day 28 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com