Whoops -- cancel the party folks. Apparently the rankings just count the percentage of GitHub repos with any amount of the language in it. I bet CoffeeScript's recent rise has a lot to do with a handful of auto-generated-by-default files in Rails projects.
I'm in the process of ripping the last bit of coffeescript out of our code. The marginal benefits of the language don't exceed the costs of having another build dependency, and another syntax to understand. For daily work, I already have to switch contexts between Javascript, CSS, SCSS, HTML, rHTML, HAML and Ruby (not to mention other tools like Bash, Rake, etc., along with API knowledge like the Rails API, jQuery, and all of the various un- or poorly-documented gems). Ultimately, it's a huge mental burden. Every new thing is a new thing that someone has to understand to be productive.
To justify the extra mental cost of another piece of technology, it has to do something pretty amazing. A minor syntactical transformation of javascript just doesn't cut it.
It's more expressive. It's like going from having a 19" monitor with 1440x900 to a 24" monitor with 1920x1080. Sure, you can do all the things you can normally do with the 24" monitor that you could do with the 19" monitor, but it isn't as pleasant or efficient.
The place it best fits in right now is for in-house software development at a place with a low turnover of developers. 37signals has a very low turnover, so it shouldn't be surprising that it fits them well. That mental burden is low, compared with the time saved using it.
"It's like going from having a 19" monitor with 1440x900 to a 24" monitor with 1920x1080."
Ehh....I think you're overstating it, but to each their own. To make the comparison fair, you'd have to turn it into something more obtrusive: it's like going from a 19" monitor to a 20" monitor that's driven by one of those $300 USB video cards that gets really hot and eats up desk space and might occasionally cause RFI problems with my wireless mouse.
Or more directly, it's like going from Ruby to Python, or vice-versa, by using a tool that converts one to the other. They're different, and they have different syntactical features, but the annoyances of either language balance the benefits to the extent that I can't confidently exclaim that one is better. And the auto-generation step would just cause pain.
The critical difference here is that to use coffeescript, I have to add another (IMNSHO) annoying step to my build process. Another layer of indirection to obfuscate bugs. Another sprocket that can come unglued and bork my app at any time. No thanks. I'll stick with my current complexity level, and write my list comprehensions as loops.
My build process is automated, so it's not a huge darn to me if my computer has to run one additional program once in a while. It's running dozens of them all the time. And if you find CoffeeScript creates a lot of JavaScript bugs that aren't in your CoffeeScript source (adding "another layer of indirection to obfuscate bugs"), I think your experience is atypical.
And as for "obtrusive," I guess that's just subjective.
Apart from the fact that Python can be infinitely faster than rails, I'd just say that any more javascript is bad news, bee it coffee based or node based or whatever. Someone forgot to go back in time and shoot John "javascript" Connor.
On topic, your main problem is that you're playing the one man army with too many tools, that is obviously unrelated to CS or any language.
It's likely you wouldn't mind the additional complexity if you were only working on front-end.
> A minor syntactical transformation of javascript just doesn't cut it.
If every CoffeScript program shared the same AST as its generated JavaScript program, i.e. if only the parse tree representing the concrete syntax differed, then your statement would be true.
However, that is not the case. The abstract syntax of CoffeeScript differs significantly from JavaScript, for example in CoffeeScript almost every statement is also an expression, which is not the case in JavaScript.
It'd be nice to have someone from GitHub comment on how these rankings are calculated. Raw LOC? Percentage of projects with at least one X language file in them? Percentage of projects that have a plurality of source code in X language?
I second this request. Been wondering more about this process ever since I noticed, sometime in January, that Rust (a nascent language with very little use yet) was ranked in the low-20s for language popularity. The problem likely had to do with how the Rust devs registered their language with Github's Linguist[1] project; Rust's units of compilation ("crates") have the .rc extension, and Github must have taken this to mean that every project with a .rc file (notably many Android-specific projects) contained Rust code. The Rust devs have since revoked that association from Linguist[2], but since Github takes a while to reevaluate a project's language breakdown, the language's popularity ranking on Github is still artificially inflated (sitting at #31 at the moment).
Note the language breakdown, under the Graphs tab.
But yes, it all hinges on how Github measures popularity. For one, I'm curious how forked repositories are counted; if I have a 100kloc Blub project and it gets forked 100 times, does Github count that as 100,000 or 10,000,000 lines of Blub?
defunkt has confirmed that at least in the past if you had a repo with 100 Perl files and one JavaScript file it would count equally towards both languages.
I think those numbers also reflect something other than the obvious.
There's a huge contingent of…uh…let's just say "differently educated" developers who previously were making some delicious pasta in PHP and now want to build iPhone apps because they heard there's gold in them thar hills.
Objective-C is also a lower-level language than CoffeeScript and thus harder to use, especially if you're not used to working in a language where it's possible to free memory early or smash the stack.
So CoffeeScript is a very easy language that tends to be used by developers who are experienced in its domain, while Objective-C is a relatively hard language that has gotten a huge influx of rank amateurs in Stack Overflow's lifetime. Thus, the latter gets a disproportionate number of questions.
(For credibility's sake: I'm one of the top contributors to the Objective-C tag on Stack Overflow.)
Other factors probably at play: Obj-C MUCH older. CoffeeScript designed to be simple and have fewer "bad parts" thus fewer questions. Many problems faced while coding CoffeeScript are actually javascript or DOM or Web questions so you don't tag them with CoffeeScript. StackOverflow isn't overly loving of CoffeeScript, so I often ask my questions using JavaScript even if my source is really CoffeeScript (and again the questions aren't really about CoffeeScript but usually about JavaScript).
Objective C has been in heavy use for a lot longer then CoffeeScript though. CoffeeScript has only been stable for over a year. Objective C has been in use since before the creation of StackOverflow.
You have to factor in all the newbies that here all this doom and gloom about the job market in the media, and the last tidbit in the news story usually mentions "but there is a lot of growth in iPhone and Android apps". This is probably causing a lot of people new to programming to learn Objective-C, thus many more questions.
That could also say something about the languages and the platforms rather than the number of people using them, especially since all of Apple's libraries fall under the category of Obj-C. You're probably right, just wanted to point that's not necessarily a good measure either.
I'm curious whether GitHub includes private repos in these statistics. If not, then I'd be curious how it would change things if they did (not saying they should, just curious to contemplate the difference).
We include only public repositories in those stats. I ran the numbers across the site, and the rankings don't change much. Javascript and ruby are still at the top, but Objective-C and Coffeescript are 10 and 11.
I don't think this says much about CoffeeScript, which I use. However I do think it says quite a bit about how GitHub has plenty of room to grow as they make themselves more attractive to a broader market.
A very interesting chart would be GitHub account revenue broken down by file extension. Note that I didn't say language, as the real money is in assets, not code.
Isn't this simply a category error? C++98 and C++0x aren't separate languages, nor are Python 2.x and 3.x. CoffeeScript has good branding, but is it really its own language?
For some language X where Y “compiles to “ X, Y is a new language if it introduces new semantics. For example, pure functional semantics, or object-orientation, or pattern matching, or method flavours, or static typing.
One easy test for this is to ask whether compiling Y to X can be done in small chunks or whether it requires “Whole program rewriting.” For example, transforming a program with continuations into CPS requires whole-program rewriting. I would call any language that adds continuations to JavaScript a new language on that basis alone.
CoffeeScript is almost entirely local transformations. I think of it as JavaScript.
I think differently in CS vs JS. I go for different solutions because they seem more elegant in CS than they did in JS. And if language shapes how we think, then surely thinking differently makes it a different language. Maybe.
This seems like a reasonable definition. Does CoffeeScript not have its own idioms, though? I’ve never used it myself, but a search turned up this chapter on idioms in “The Little Book on CoffeeScript”: http://arcturo.github.com/library/coffeescript/04_idioms.htm...
Javascript has a distinction between statements and expressions, while to my knowledge CoffeeScript does not. "Everything is an expression" is a huge difference in semantics even though nothing has been added.
Let us suppose that languages BE and LE were designed completely independently, but came up with the same semantics in a different syntactic packet. For arguments' sake, let's suppose Google made one and Apple the other. They had different marketing budgets, different logos, different conferences. Religious wars were fought over them. Even though they had identical semantics.
I didn't downvote him, but one alternative is that a language is defined by a grammar. Of course you'd want to group certain very similar grammars together as one language (Python 2.x and 3.x), but the grammars of CoffeeScript and JavaScript are significantly different.
That’s also a reasonable definition. Since I didn’t say “if and only if,” both definitions are compatible. By the grammar definition, we could make a language with pure JavaScript semantics but Lisp-ish s-exprs, and it would be a different language as well.
I think the difference between syntax and semantics can be quite blurred sometimes. For example, CoffeeScript embraces the "everything is an expression" philosophy and that's a pretty big difference for me compared to plain JS; it affects the way i write -and think about- code in a much deeper way than using indentation instead of braces. So, is the difference between having statements and expressions as different constructs and having only expressions just a syntactic difference?
Another aspect in which CS differs from JS is that it provides built-in classes; which i think can make code written in CS much more consistent compared to JS, where everyone seems to like inventing their own way of writing classes.
And i'm sure i'm forgetting other aspects in which CS differs from JS that i wouldn't consider "just syntactic".
By this logic no language is a real language other than JavaScript, since as we've seen, you can make just about anything "simply compile down" to JavaScript.
Let me put it another way. If I were to write a separate runtime that directly executed CoffeeScript (without JS as an intermediate step), would you then be satisfied that it is in fact a real language?
Now that you say it, and I think about it more, I guess you're right. It does add features like list comprehension and pattern matching, and the compilation really is ambiguous.
Having coded in javascript for 4 or so years, and a recent love for NodeJS in a couple of internal projects, I'm a bit torn between giving coffee a proper go or not.
Can any one employee give a gist of how used it is in production? From what I've seen I would love to use coffee (I've actually used coffee in reverse, to tweak out a javascript function), but I'm wondering if I'd be lowering my productivity.
What I mean by that is, if I wrote coffeescript, but everyone else worked in javascript (or compiled coffee), then it'd be silly of me to continue doing so. Similarly I've watched a lot of node module development over the past year, and only once I've come across a module written in coffee.
I do of course realize NodeJS in itself is not "very" widespread yet, but are there any node users who can shed some light on the possible future of coffee in node?
Apart from that, I believe you should try coffeescript or any language you become interested in, it's a very way to keep on improving, opens your mind to different paradigms too.
Ugh, Coffeescript. Javascript doesn't need any further abstraction, we already have jQuery which made everyone's lives easier but at the same time has created a new-breed of developers who only know jQuery and not Javascript itself. This is the exact same thing, people will know Coffeescript if it takes off further in popularity but won't know Javascript.
That is so sad. I am not a fan of CoffeeScript. The language is like Ruby and When people try to make one language look like another, I don't like it. I probably would have liked it if the syntax was a bit different. It looks more like a ruby propaganda.
This is the weirdest, least substantial criticism I've ever seen of CoffeeScript. Do you hate C for looking like B? Python for looking like a cross between C and ABC? Haskell for looking like ML? Objective-C for looking like both C and Smalltalk? Almost every mainstream language for pretty strongly resembling ALGOL-68? Heck, Ruby itself was intentionally made to look like Perl. Criticizing a language's syntax is often just an expression of personal preference — but criticizing a language for using syntactic conventions that are familiar and generally well-liked? That just makes no sense.
Source: https://twitter.com/joshpeek/status/205783659830198273