4 ms·
It's hard to tell if the fact that CoffeeScript is #6 (the highest ranked major language) and Javascript is #51 (second to last) is a reflection on how much of
by danso 14y ago
It's hard to tell if the fact that CoffeeScript is #6 (the highest ranked major language) and Javascript is #51 (second to last) is a reflection on how much of a shift CS is from JS, or on the quality of methodology and metrics in the OP.
- dsberkholz 14y agoYeah, I agree — I really doubt it's that large of a shift, as I mentioned under "Specific language effects." I find it hard to believe that JavaScript could really be less expressive than C and assembly.
- randomdata 14y agoI also found it interesting that Objective-J is well ahead of Objective-C. The parts of those languages that are not pure Javascript and C, respectively, seem like they should be equally expressive. Especially when Javascript and C score side by side, eliminating any effects by expressiveness of the subset language.
- jinks 14y agoI think one point that has been overlooked so far is that many projects might copy in a bunch of JavaScript (jQuery, etc.) and then write the glue code in CoffeeScript. So you get a commit with 3kloc JavaScript and maybe 20loc CoffeeScript.
- vec 14y agoI'm thinking that's mostly due to the testing methodology. In JS it's pretty common to start a project by downloading and committing jQuery, Underscore, and whatever framework dependencies you're using. And just speaking from experience, coffeescript is better, but it's not _that much_ better (I'd guess ~1.5 lines of JS per line of CS, the chart shows somewhere around 8:1).
- randomdata 14y agoCoffeescript, I find, is more apt to force you into a more cohesive pattern for structuring your code which could help avoid large refactoring stints.
- kyllo 14y agoYeah, this is clearly broken for Javascript. I don't think they're counting imported packages and libraries as extra LoC for other languages, but for Javascript they seem to be counting a jQuery import as an additional 9,597 LoC in the commit. On the other hand, I guess they probably aren't counting inline Javascript in HTML files.
- tootie 14y agoI'd say it's a byproduct of the fact that only in-the-know developers are using CoffeeScript, while JavaScript is being written by every rank-and-file amateur web dev in the world. There is likely an inverse correlation between language popularity and median code quality.
- jerf 14y agoAt the risk of being a bit incendiary, I would observe that you can apply that alternate hypothesis across pretty much the entire chart. One could propose that what we see there is something more like "inverse average skill of the developers using this language". JS is an outlier due to the fact that the language's position on the web has a lot of hacks using it. (This is not itself a reflection on the language, but on its position in the world.) It's not perfect (I'd toss Auguas and Puppet out of this entirely as they aren't really programming languages; assembler probably really is a lack of expressiveness, VHDL possibly the same), and I'm not really proposing it as The Answer, but it is an interesting and viable alternate hypothesis.