* http://intertwingly.net/blog/2010/11/25/Hobgoblin-of-Little-...
* http://brendaneich.com/2010/11/paren-free/
* http://developer.yahoo.com/yui/theater/video.php?v=crockonjs...
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.
book.save
title: "The Book of the Thousand Nights and One Night"
length: 45
chapters:
"The Fisherman and the Jinni": 1
"The Tale Of The Ensorceled Prince": 13
"The First Kalandar's Tale": 27
Compiles into this JavaScript: book.save({
title: "The Book of the Thousand Nights and One Night",
length: 45,
chapters: {
"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.
Well, shit.
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.
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.