Note the following changes.
Notice how our syntax is now invalid due to an extra comma at the very end, a missing comma between the 5 and the 4 in the “numbers” list, a missing comma after the “otherThings” object literal and the “numbers” list, a missing comma after the “five” key in the “otherThings” object literal, and an extra comma at the end of the “otherThings” object literal. By making 3 trivial and what should have been non-breaking changes 5 separate syntax errors were introduced. Something as simple as moving a bit of code around, like I’ve done in this example, should not have as large of an impact as it did.
compared to Python, which has some additional syntactic noise
and Ruby, which has some additional syntactic noise as well
Here is an example of a class in Ruby defining a similar object:
And a similar class in Python:
Also, object literals in CoffeeScript fix the whole punctuation issue for free (notice there is almost no punctuation and also extra punctuation in the list):
I think that about wraps it up for now, thanks for reading and remember Test, Lint and CoffeeScript!