|
|
|
|
|
by ejames
5272 days ago
|
|
It's a joke commit, with auto-generated CoffeeScript from a conversion tool. About 3,700 deletions come from files that were erroneously replaced by empty files. Another 1,400 or so are from removing the license comment at the top of the files, and I'd imagine stripped comments throughout the code add a bit more. The actual compression ratio seems to be about 20-25%, then. It's likely that idiomatic CoffeeScript, rather than generated CoffeeScript, would be somewhat shorter, but probably not by a drastic amount; I'm no JavaScript guru but the Node.js source doesn't strike me as verbose to begin with. It seems to me that CoffeeScript is in some ways an attempt to make you write using only - in the words of Douglas Crockford's book title - "Javascript: The Good Parts". The most representative test of its success would thus be rewriting a bad library or tool into CoffeeScript and seeing if it makes the inner badness come to the surface where you can deal with it more easily. If you're already writing disciplined, well-organized JavaScript, than there's no reason to stop. |
|