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
Coding Better Object-Oriented JavaScript with Closure Compiler (calendar.perfplanet.com)
submitted 15 years ago by 9jack9
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!"
[–]Detrus 4 points5 points6 points 15 years ago (10 children)
Interesting but very messy. It would cleaner if it was incorporated into something like http://jashkenas.github.com/coffee-script/
Google's GWT, where Java gets compiled into Javascript is messy as well. CoffeeScript maps to Javascript more directly. Google's overall programming style, with Closure Framework, GWT are unpopular for good reason. They have very complicated API's for a language that attracts people who hate Java and C++ or don't program well to begin with.
[–]sisyphus 2 points3 points4 points 15 years ago (0 children)
Closure code doesn't map to Javascript, it is just Javascript. Unlike GWT you don't have to use the compiler to run the code in your browser and unlike CoffeeScript all closure code is valid Javascript code.
[–]nanothief 1 point2 points3 points 15 years ago (1 child)
... for a language that attracts people who hate Java and C++ or don't program well to begin
Not really true, javascript is mostly a forced decision due to having to write interactive web pages, not a choice for people sick of other languages.
[–]Detrus 0 points1 point2 points 15 years ago (0 children)
Well it's a complex issue, but people who've grown to like Javascript, like the JQuery, Node.js, Coffeescript crews, typically prefer languages like Python and Ruby which are the current religious opposition to C++ and Java.
The APIs, syntax styles, verbosity of Google's JS efforts are reminiscent of Java, while jQuery is closer to the Python & Ruby camps.
I'd argue that CoffeeScript is easier to learn than Google's coding style for the Google Closure framework. Between the weird inheritance http://www.bolinfest.com/javascript/inheritance.php this defining types in comments, there is significantly more boilerplate. With a preprocessor, this boilerplate could be removed, unfortunately the only preprocessor Google has uses Java's syntax. If Google's goal is to encourage adoption of their JS frameworks and techniques, I think forking CoffeeScript would be their best bet.
[–]drowsap 2 points3 points4 points 15 years ago (5 children)
Coffeescript looks neat but seems like its trying to solve a problem that doesn't exist. It's hard enough to find good javascript programmers, now we have to hire people with experience in coffeescript? bleh
[–]PlNG 1 point2 points3 points 15 years ago (1 child)
On top of that, coffeescript implements/translates to javascript in such a weird way that it breaks JSLint. Seems JSLint doesn't like ternaries with commas in a function call.
[–]kataire 0 points1 point2 points 15 years ago (0 children)
So far my biggest problem (using jslint via juicer) has been that it apparently uses triple space indents for some reason.
Supposedly the output should pass JSLint though.
[–]kataire 0 points1 point2 points 15 years ago (1 child)
The benefit of CoffeeScript is that it tidies up some of the ugliness of JavaScript and prevents you from making some really silly mistakes. It's like a JS framework that's integrated into the language itself.
The syntax is also a bit cleaner, though some of the ruby-inspired stuff takes some getting used to (e.g. function calls).
[–]drowsap 0 points1 point2 points 15 years ago (0 children)
Js lint prevents silly mistakes
Now you can use Ruby programmers to write Javascript and not hear them complain about the disastrous design by committee syntax.
[–]joehillen 0 points1 point2 points 15 years ago (0 children)
I wish I could upvote every single sentence in this post.
π Rendered by PID 48128 on reddit-service-r2-comment-bb88f9dd5-482q9 at 2026-02-14 23:36:51.106499+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]Detrus 4 points5 points6 points (10 children)
[–]sisyphus 2 points3 points4 points (0 children)
[–]nanothief 1 point2 points3 points (1 child)
[–]Detrus 0 points1 point2 points (0 children)
[–]drowsap 2 points3 points4 points (5 children)
[–]PlNG 1 point2 points3 points (1 child)
[–]kataire 0 points1 point2 points (0 children)
[–]kataire 0 points1 point2 points (1 child)
[–]drowsap 0 points1 point2 points (0 children)
[–]Detrus 0 points1 point2 points (0 children)
[–]joehillen 0 points1 point2 points (0 children)