Re:CoffeeScript, a little language that compiles to JavaScri...
by jashkenas on Thursday December 24, 2009 @05:40PM
(#1014493)
Which is why CoffeeScript lets you leave commas out of multiline object and array literals (for those that didn't see catch it in there):
something: {
foo: "bar"
bar: "baz"
}
Re:CoffeeScript, a little language that compiles to JavaScri...
by btilly on Thursday December 24, 2009 @05:38PM
(#1014490)
If the second form works and avoids bugs, can't you train your eyes to accept it?
That's what I did in SQL a few years ago, and I can't count how many times it has helped me since.
(Personally, I always write:
which works in Firefox, but not IE. A compiler would not be upset when it omits that extra trailing comma. Of course, you can always write: But let's face it, that is only not ugly in Haskell.)