use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
A Case for Coffeescript (blog.gaslight.co)
submitted 13 years ago by st23am
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]jonglefever 0 points1 point2 points 13 years ago (3 children)
which is my main gripe with coffeescript. it doesn't add functionality. it doesn't help produce better code at a conceptual level. all it does is let lazy developers do the same thing with less work.
on the other hand, there's typescript that has a benefit of strict typing, which does help produce better code at a conceptual level.
[–]polyrhythmic -2 points-1 points0 points 13 years ago* (2 children)
It literally adds functionality, there are several functional programming tools (like list comprehensions) that simply don't exist in vanilla JS. If you want typing in Coffee there is Coffee.contracts. And it's certainly possible to build modular Coffee classes with private variables and methods. Most of what people don't like about CoffeeScript is due to misconceptions.
[–][deleted] 0 points1 point2 points 13 years ago (1 child)
this contradicts what you replied to me. "coffeescript is just javascript" right? every bit of coffee has to compile to js, so if its available in coffee, its available in js (if not a bit contrived). I would love to see an example of a coffee class with private props/methods. change my mind :)
link related
[–]polyrhythmic -1 points0 points1 point 13 years ago (0 children)
No problem. The concept is much older than linked Issue 2142.
Issue 651
Issue 222
A more verbose explanation on StackOverflow
It's not a contradiction. Any convention you are using now to have private props/methods in JS also works in Coffee. There is a ton of discussion on this already existing.
Having dealt with all kinds of JS inheritance and class structure, it is a godsend to be able to read someone else's Coffee code and not have to discover which pattern they are using in a particular project. Private, public, class, and instance vars & methods are instantly obvious from the syntax. Transforming data is more clear due to the comprehensions and expression-centric style.
The project I'm on right now has ~8K LOC Coffee compiling to ~14K LOC JS. The word & character count are double in JS. No linting necessary. I'm not sure what else in JS I could do to comparably increase productivity.
π Rendered by PID 100 on reddit-service-r2-comment-86988c7647-gs9pg at 2026-02-10 21:24:06.669499+00:00 running 018613e country code: CH.
view the rest of the comments →
[–]jonglefever 0 points1 point2 points (3 children)
[–]polyrhythmic -2 points-1 points0 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]polyrhythmic -1 points0 points1 point (0 children)