by joemoon · 14y ago · 0 comments
Isn't this precisely the problem? Why make a better Javascript then make the same mistakes as the original? One of the main goals is for Coffeescript to be more readable that Javascript. Having ambiguous syntax and so many different ways of doing things means that people will write code in all of these different ways.
Your rebuttal is a long list of what you SHOULD and SHOULDN'T do, but there are two problems:
1. Not everyone will agree with you.
2. People will write it the "bad" way anyway.
Ultimately this means less readable code, especially when you have to read someone else's code.
People will write bad code in every programming language you give them. I don't see that as a justification for limiting the expressiveness of a language. If you take that line of reasoning too far you end up with Java.
That's a straw man. I never said that the expressiveness of the language should be limited. There are plenty of languages that are just as (more?) expressive than CoffeScript without the syntactical ambiguity.
> If you take that line of reasoning too far you end up with Java.
That's the slippery slope fallacy. I am in no way suggesting that CoffeScript should have completely rigid syntax. Surely there is a happy medium between CofeeScript and Java. There are plenty of languages that live there.
Even python's critics would admit it's a very readable language, and it would be unusual to claim it's not expressive.
x = 3;Is it really more expressive just because there are N ways to do it?
In short, it was badly designed. Pointless to use it.