Re:A Python programmer’s first impression of CoffeeScript
by jashkenas on Thursday May 12, 2011 @06:37PM
(#2542630)
I think this a great attitude towards optional syntax. For example:
xCoord(points[0]) - xCoord(points[1])
...is clear, but paren-ful, whereas: print object
...is also clear, but has no need of parens.
Having been writing Ruby for a few years, I really dig that parentheses aren't required - you can write code that reads a lot more like English and a lot less like...well, code. It does take some mental re-training though. Once you've grown accustomed to it, it scans really nicely, and while it's very possible to write code that's difficult to visually parse, good programmers will use parentheses when they improve clarity, and omit them when they don't.
It helps a LOT to remember that in Coffeescript, you're more or less never naming functions - you're just passing around a bunch of lambdas. The function syntax tripped me up at first, as well, but once I got a handle on what it was doing, it makes a lot of sense.
I've described Coffeescript as "Javascript in drag as Ruby with a Python under her skirt", and I think it's a fairly apt description. :P