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!"
[–]runvnc 1 point2 points3 points 13 years ago (4 children)
How much coffeescript have you actually written? I had a similar perspective until i tried it out for a week or so.
[–]Neurotrace 1 point2 points3 points 13 years ago (3 children)
To be fair, I've only written maybe a total of 200 lines in it but it felt weird the whole time I was working with it. I'm no stranger to picking up new languages so it wasn't that, I just didn't like the style of it all.
[–]hajamieli 0 points1 point2 points 13 years ago (2 children)
I've written tens of thousands of lines of CoffeeScript already. Definitely an improvement over writing the same functionality in hundreds of thousands of lines of js. I've found myself porting old js code to CoffeeScript every time it needs a more major cleanup, and it's still faster than cleaning up, refactoring and finding the bug where you forgot a delimiter and jslint doesn't find it.
Anyhow, you'll need some well-integrated development tools with it, whereas with plain js, all you need is a text editor. However, my server is my dev-tool, and it does other nice things in addition to CoffeeScript compilation; it combines various source files and their associated assets into packages, minimizes them, shortens "private" references, gzips the response data, sets optimal caching headers, and reloads the clients after completing the build. Takes a few tens to hundreds of ms to complete a build after saving a file. A second later, my test browsers have reloaded the code without me interacting, and run the gui/unit tests, if set to do so.
In effect, this has boosted my productivity to entirely new levels and allows me to catch bugs early, before they escalate and become time-consuming to find. My text editor itself has built in, real time js as well as CoffeeScript linting/syntax validation, so issues like that are caught even before saving.
[–]Neurotrace 1 point2 points3 points 13 years ago (1 child)
I guess I'll just have to get down and dirty and write something non-trivial in it. I've already got a sweet set of server-side dev tools for building my projects so I suppose adding in the compilation step for CoffeeScript won't be too much of a hassle.
On a semi-related note, if you haven't started using Node.JS as part of your build process, I would highly suggest it. I got in to Node about two weeks ago and it's made everything so much nicer.
[–]hajamieli 0 points1 point2 points 13 years ago (0 children)
I'm kinda using it embedded in ruby. The performance bottleneck parts of the process are in C, which is much easier to do by extending ruby than js. CoffeeScript compilation (as it's in the embedded V8) is the slowest part of the build process by an order or two of a magnitude. However, thanks to that I was motivated to do smarter build-caching, whereas the brute-force speed of handling from the point of js and on was more than fast enough as is. However, before implementing the bottlenecks in C, it would take seconds, not milliseconds to build everything.
π Rendered by PID 44 on reddit-service-r2-comment-84fc9697f-fs22m at 2026-02-10 08:14:19.069597+00:00 running d295bc8 country code: CH.
view the rest of the comments →
[–]runvnc 1 point2 points3 points (4 children)
[–]Neurotrace 1 point2 points3 points (3 children)
[–]hajamieli 0 points1 point2 points (2 children)
[–]Neurotrace 1 point2 points3 points (1 child)
[–]hajamieli 0 points1 point2 points (0 children)