Questions tagged [coffeescript]

For questions about CoffeeScript - a little language that compiles into JavaScript.

"CoffeeScript is a little language that compiles into JavaScript" (source: http://coffeescript.org/).

CoffeScript is one of the mini-languages that produce JavaScript code. The main difference with other implementations is that it does not try to "hide" or substitute actual JavaScript, just to fill in some gaps and ensure best practices. There are plugins for many programming frameworks as well as a stand alone and on-line compilers. It's syntax borrows popular ideas from Ruby and Python.

12 questions
49
votes
6 answers

What are the pros and cons of Coffeescript?

Of course one big pro is the amount of syntactic sugar leading to shorter code in a lot of cases. On http://jashkenas.github.com/coffee-script/ there are impressive examples. On the other hand I have doubts that these examples represent code of…
Philip
  • 1,659
  • 1
  • 15
  • 19
11
votes
4 answers

Should I invest time learning Coffeescript?

I am a freelancer and I earn my bread and butter by helping others write better java-script code. I have good experience with most of the JavaScript frameworks around. I am wondering if it is worth for me to invest time in learning coffeescript.…
Eastern Monk
  • 339
  • 3
  • 8
10
votes
6 answers

CoffeeScript and Named Functions

Elsewhere, an argument has arisen over the terminology of a named function in CoffeeScript. In particular someone referred to something like this: foo = -> console.log("bar") as a named function. But its been objected that everything in…
Winston Ewert
  • 24,732
  • 12
  • 72
  • 103
6
votes
5 answers

Language Design: Are languages like Python and CoffeeScript really more comprehensible?

The "Verbally Readable !== Quicker Comprehension" argument on http://ryanflorence.com/2011/case-against-coffeescript/ is really potent and interesting. I and I'm sure others would be very interested in evidence arguing against this. There's clear…
4
votes
4 answers

How is CoffeeScript influenced by Haskell?

I've been using CoffeeScript for a while now. On Wikipedia, it is said that CoffeeScript is influenced by Haskell. But after I check out the syntax of Haskell, I have found little resemblance from CoffeeScript. Which aspect of CoffeeScript is…
ming_codes
  • 379
  • 3
  • 7
3
votes
2 answers

What is the reason behind the if syntax of CoffeeScript?

In most other languages the condition comes before the statement to be executed when the condition is met. However, in CoffeeScript (and maybe some other languages) the syntax is: number = -42 if opposite Is there any online documentation of what…
2
votes
1 answer

Is Current CoffeeScript Module Pattern Valid?

I have a Node.js web application that's written in CoffeeScript, which has a set of "services". These various services are currently exposed as a CoffeeScript class, which does a few things that I like. For one, I get a method that gets ran once…
AlbertEngelB
  • 213
  • 2
  • 8
1
vote
2 answers

What is the use case for shadowing variables?

One of the things the coffeescript programming language is criticized for is its treatment of variable declarations and scope (example). The answers to this question (and the blog I linked to above) seem to hinge on the false dichotomy of variables…
Jared Smith
  • 1,620
  • 12
  • 18
0
votes
1 answer

Pattern that prevents events to trigger themselves

I am working at the client-side part of a web application, that is responsible for getting answers from users for specific questions and storing and restoring them from the database (or cookies) and I am running into the issue that updating the…
0
votes
2 answers

How can CoffeeScript be written in CoffeeScript?

How is it possible that written a programming language like CoffeeScript in itself like CoffeeScript? Firstly CoffeeScript doesn't exist that read CoffeeScript scripts and interpret them?
-1
votes
1 answer

How to make a non-english clone of CoffeeScript?

I want to make a non-english programming language that is identical to what CoffeeScript is to JavaScript. What I mean is that I don't want to build my own design or syntax. Just want to have a non-english programming language that compiles to…
Ansd
  • 161
  • 8
-1
votes
2 answers

How Challenging is it to Mix Pure JS with CoffeeScript on a Team?

I keep running into Senior JS positions where they want CoffeeScript. The reason I don't use CoffeeScript is that my first impression of it was that it puts limitations on JS OOP features that I find valuable. I've seen claims that the two can…
Erik Reppen
  • 6,243
  • 31
  • 34