Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Not speaking for the parent, CoffeeScript is even worse than Javascript. The killer for me is indentation forming scope. If you accidentally indent your code incorrectly, like when you're copy/pasting from one file to another, you can change the scope of all of the variables within.

The other major problem I have with it is that it encourages us to go back to the class-based patterns that we've been trying to get away from.



Please. Coffee has its problems, but being white-space sensitive is not one of them. It's entirely a matter of personal preference, just like preferring {...} instead of begin...end or using '' instead of "" for strings; it's not even as significant as prefix vs. infix syntax, which does have some practical consequences. You get indentation based blocks in quite a lot of languages, Haskell, F#, Python, Nimrod, MoonScript and others and it works there, I see no reason (knowing them all) for it to be a problem in Coffee particular case (to be honest, Coffee allowing inconsistent indentation in a single file is a bad design decision, though).


You aren't likely to see this again, but in case it helps, the following setting in Sublime Text's key bindings may help you:

``` { "keys": ["super+v"], "command": "paste_and_indent" }, { "keys": ["super+shift+v"], "command": "paste" }, ```

Though you should always be careful when copy/pasting code.

I'm not sure how it encourages classes, I personally didn't even use classes at all for the first long period of my CoffeeScript life. And now only do sparingly.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: