Hacker News new | ask | show | jobs
by ricardobeat 4874 days ago
Because it is javascript, to be used by javascript projects. Not having JS examples is just a problem in the docs, not the library.
1 comments

No, it's not JS.

    > class UseCase
    SyntaxError: Unexpected reserved word
Of course the point is it's not clear what it means to "be JS". Is it more important for the name to express what syntax the source code is in or what platform the code can run on? I think for your average developer who just wants to consume a library, they care more that it is a javascript-based library that they can use.
Of course CoffeeScript code won't run as javascript, it's not a superset. But it operates on the same global scope, the same object model, with similar semantics, so it "is" javascript, unlike other compile-to-js languages.

After reading more about it, I agree that it shouldn't have .js in it's name, or any other language extension, since it's not a framework/library. The fact that the examples are written in CoffeeScript is incidental.