r/programming • • Jul 25 '13

CoffeeScript's Scoping is Madness

http://donatstudios.com/CoffeeScript-Madness
207 Upvotes

315 comments sorted by

View all comments

-8

u/[deleted] Jul 25 '13

The worst offense of CoffeeScript is the syntax. I know they were going for concise, but replacing words with hieroglyphics is never the answer. Didn't everyone reject Perl for that reason? Replace function with def or sub and you're concise. Replace it with -> and you've gone right past concise to obtuse.

5

u/wyaeld Jul 25 '13

-> is coming to JS.

No-one who actually uses it considers it difficult.

0

u/[deleted] Jul 25 '13

I wrote Perl as my primary language for a good 4-5 years, so no I don't have a problem with it. I just don't understand why we would make a conscious decision to move toward it in 2013. I have the same problem with Scala. It's practically the Holy Grail of features, but it reads like a mess of punctuation marks.

0

u/[deleted] Jul 25 '13

[deleted] — view deleted comment

0

u/Intolerable Jul 26 '13

You have type annotations, though, which aren't particularly nice-looking.

int add(int x, int y) { return x + y; }

vs

add = (x,y) -> x + y // admittedly not static-typed

vs

add x y = x + y // static-typed, but succinct and doesn't require annotations

0

u/[deleted] Jul 26 '13

Yes, that's what I'm arguing. You don't need annotations or keywords!