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

My assertion is that CoffeeScript is not an alternative syntax for JavaScript because of differences in scoping. My opinion is that this is not a good design choice because it increases the separation from the original language, requiring that someone who already knows JavaScript additionally learn CoffeeScript.

You can take the rest of my original comment as a rehashing of my evaluation of CoffeeScript, since I only see it when it appers on Hacker News.



In practice, the scoping difference that you run into 99% of the time is that implicit var keywords are in front of variables that haven't been seen in the current scope, and you have to assign globals to your top level scope (window in the browser). How long did it take me to bridge that separation from the original language? Oh, about a minute.


you shouldn't have to have a minute or even second considering the idiosyncracies of the underlying language...


I've made a one-time investment of a minuscule amount of time and have been raking in the saved time and effort from not having to type var statements or track down lack-of-var bugs.

Pure profit for me, but as always YMMV.


Have you tried it? I had the same opinion for a while, but after I wrote some code, I found the translated code easy to understand - and the language itself helpful and consistent.




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

Search: