4 ms·
> CoffeeScript (and its derivatives: LiveScript, Coco, etc) have serious issues of ambiguous code, alien syntax and scoping problems. How long will programmers
by klibertp 12y ago
> CoffeeScript (and its derivatives: LiveScript, Coco, etc) have serious issues of ambiguous code, alien syntax and scoping problems.
How long will programmers think of "alien syntax" as a problem? I don't understand it at all - syntax should fit the problem domain and language semantics first and foremost, NOT expectations of programmers writing in other languages. It makes absolutely no sense - from a language design perspective - to invent a new, interesting language and then try to fit it into some "standard" syntax. In my mind this misses at least half of a point of creating a language in the first place!
- CmonDev 12y agoBut there is no problem: "programmers writing in other languages" - they will keep using those other languages, while you will use your new language with unusual syntax. Alone. Now if you want to persuade those other developers to use it, then maybe you should meet them half-way?
- 14113 12y agoYou're assumming that programmers will only switch languages if they already "know it". What about other benefits to other languages, such as different paradigms, type systems or other semantic features? Surely to someone who actually writes code they're just as important as the syntax?
- AnimalMuppet 12y ago> Surely to someone who actually writes code they're just as important as the syntax? They're more important. I don't switch tools just to get better syntax (unless the syntax is really horrible). I switch to get a tool that will do something different, or do the same thing better. So: Don't switch syntax just to switch syntax, and expect anybody to care. On the other hand, things that are really different but have the same syntax can be confusing. You subconsciously expect it to work the old way, and it doesn't...
- tomp 12y agoIMO, the bigger complaint about CoffeeScript is ambiguous syntax - the syntax tree is very sensitive to even the smallest whitespace changes.
- alongub 12y agoExactly. Syntax style is usually a matter of personal opinion. "Alien syntax" wasn't very objective and I should probably remove it from the website. However, ambiguous syntax is a huge problem of CoffeeScript. Read more here: http://ceronman.com/2012/09/17/coffeescript-less-typing-bad-readability/ http://ceronman.com/2012/09/17/coffeescript-less-typing-bad-...
- ash 12y agoYes, CoffeeScript syntax is often ambiguous, but you learn a few simple rules [1] and ignore darker corners. And I think slightly ambiguous transpiler is okay when the resulting language is not ambiguous. You can always check the output (which is very readable). [1]: For example, "[t]he implicit call wraps forward to the end of the line…"
- klibertp 12y ago> However, ambiguous syntax is a huge problem of CoffeeScript. Actually this is also a matter of personal opinion. As the author himself notes in the conclusion: "The problems described here might not apply to you if you come from a different background. I come from Python, C# and C++. But if you come from Ruby or Perl, you might think these are not problems but actually cool features." Personally I don't mind, but at least I can agree that Coffee syntax is ambiguous and can be bothersome sometimes.