4 ms·
This kind of clarification is exactly why I posted this link. It's great to clear the air in one respect and at the same time ask the question, "is there somet
by fogus 15y ago
This kind of clarification is exactly why I posted this link. It's great to clear the air in one respect and at the same time ask the question, "is there something on the CS site needing change to avoid this confusion?"
- 198d 15y agoThis has come up A LOT more than it should. There's a line immediately before the first example explaining exactly what you're looking at. It's slightly absurd to assume that's how you'd actually write those examples in javascript. The compiled javascript is rather approachable, though.
- danso 15y agoI don't know how Jeremy could make it any clearer. It says: CoffeeScript on the left, compiled JavaScript output on the right. Maybe the two halves should have the headers directly aligned above them: > CoffeeScript > The JavaScript that it compiles to. Other than that, it's hard to make it any clearer for its intended audience (people who know JS and know what the words "compiled" and "output" mean). Still, I'm tempted to upvote the OP as good Friday satire.
- phzbOx 15y agoWell, it's written in small italic gray at the top of the page. To make it clearer, it could be written "Compiled javascript" on the top right of each compiled javascript code. Or, maybe instead of a left and right rectangle, there could be a kind of arrow to inform that the left side gets automatically changed into the right side instead of showing an equivalence between the two.
- bbarthel 15y agoMy problem is that I want a comparison of syntax so I can see exactly how Coffeescript is an improvement over the equivalent Javascript. When I visit the site and I see a table with CoffeeScript on one side and Javascript on the other, my brain sees just enough to verify that the expected elements are all there before it says, "Yep - there is the comparison you wanted". So while it does clearly state that the JavaScript is the output of the tool, my brain has already decided that it is exactly what I was expecting, and it takes me a second to re-adjust my thoughts. Ironically, if the output looked less "normal" I probably wouldn't have the same problem, but it is formatted nicely and is good enough that subconsciously my brain tells me "equivalent syntax" and not "compiler output".
- grannyg00se 15y agoMy problem is that I don't find the javascript on the main comparison page to be all that bad. It doesn't do enough to warrant learning the abstraction syntax.