Some of the interesting recent features include executable class bodies, extended regular expressions, functions with default arguments, and YAML-style object literals.
Good to see new languages improving upon syntax, readability is key and a great way to gain adoption. As Norvig said, it is easier for him to explain an algorithm in python than any other language. Well, now CoffeeScript has just passed that test too.
Brendan Eich is also adapting many good things from CoffeeScript to JS.next, validating the point that coffee, in its short life, has been able to influence other great language designers.
And that says a lot about CoffeeScript and its potential.
Similar to YAML? What exactly does that mean? Is there someplace that explains the specific indentation rules?
The indentation rules of YAML are massively borked; it's not enough that something be indented, it has to be indented a very specific number of spaces. As opposed to, say, Haskell's more sane off-side rules.
title: "The Book of the Thousand Nights and One Night"
"The Fisherman and the Jinni": 1
"The Tale Of The Ensorceled Prince": 13
"The First Kalandar's Tale": 27
title: "The Book of the Thousand Nights and One Night",
"The Fisherman and the Jinni": 1,
"The Tale Of The Ensorceled Prince": 13,
"The First Kalandar's Tale": 27
The only limitations are that it must be greater than the indentation of the parent node (obviously), that all siblings must have the same indentation and that tabs are not allowed.
Are you sure you're not mistaking this with HAML? It's a bit stricter with the indentation requirements.
Thanks; how did I miss that?
"Are you sure you're not mistaking this with HAML? It's a bit stricter with the indentation requirements."
Oh, that I know. One reason I avoid it.
Everyone who has contributed in any way whatsoever, or even only just toyed with CoffeeScript should feel privileged to be part of the fantastic community surrounding the language.
Thankyou for the great gift that is CoffeeScript 1.0 this Christmas.
It is not without its cavets, though, with a little work it could be brilliant.
Danke for the mention!
There is some clear talent behind these projects.
Here's hoping for a larger community adoption!
A Riak client: http://riakjs.org/
A canvas sketch: http://jashkenas.s3.amazonaws.com/misc/buddhabrot/buddhabrot...
A string scanning library: http://sstephenson.github.com/strscan-js/
An in-browser tank game: https://github.com/stephank/orona
A Node.js-powered Rack server: http://josh.github.com/nack/
Since CoffeeScript itself is written in CoffeeScript it was quite easy for the team to create a distribution of the compiler that runs in the browser.
You can find it in the extras folder of the source code repository.
Usually though, people opt to pre-compile their CoffeeScript on the server, pack, optimise and minify it before serving it to clients.
At Feisty, we write CoffeeScript that is intended to be executed on both the server and client.
To achieve this, we wrote "requisition" - https://github.com/feisty/requisition - a server-side packager and client-side loader - via require() - for CommonJS Modules written in CoffeeScript.
For a simpler, ad-hoc solution check out my tutorial project "Walk the Line" - http://github.com/pyrotechnick/walk_the_line
Out of curiosity, what are you making?
I am "pyrotechnick" on Skype/Twitter/Facebook/Google Talk
We would love to hear from anyone who can contribute anything to the projects. Or who is interested in an alpha/beta
Please direct any questions/feedback/correspondance to "pyrotechnick" on the social network of your choice.
# Fix things CS goofs.
# Add things CS lacks.
IMHO it will never happen in the sense you imagine it but we'll see.