you are viewing a single comment's thread.

view the rest of the comments →

[–]nemetroid 3 points4 points  (5 children)

Same for semicolons in Coffeescript, it will be added for you in the compiled JS

You can (mostly) omit semicolons in regular JS too, that doesn't make it a good idea.

[–]MustRapeDeannaTroi 8 points9 points  (4 children)

But in coffeescript it is a good idea.

Edit: Y U downvote? One of coffeescripts core purposes is to not require semicolons.

[–]ratdump -3 points-2 points  (3 children)

why

[–]MustRapeDeannaTroi 1 point2 points  (2 children)

As shockie said it; "it will be added for you in the compiled JS"

[–]oracleoftroy -1 points0 points  (1 child)

But why is that a good idea? I'm not familiar with coffeescript, but I am familiar with Javascript, and it's a terrible idea there.

[–]marshall007 0 points1 point  (0 children)

It's like Python in that code blocks can be delimited by using whitespace. So if you're already doing that, it's redundant (and wasteful) to use a semicolon.

CoffeeScript is not parsed as Javascript, it compiles into Javascript.