Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

When I met Jeremy at JSConf (this was at the end, during the super-loud party), I asked whether such a patch would ever be accepted, and he said, "no, probably not." Obviously that didn't stop me and I'm glad to hear that it would be considered once it has matured :)

If it were to happen, then yes, it should certainly be an option, though to clarify, you can use the Library without the Compiler, and the way things are written now, the only file from the Closure Library that your generated code would depend upon is the bootstrapping base.js file. (Though it may also depend on array.js down the road -- see the section "Leveraging More Closure Library Built-ins" on http://bolinfest.com/coffee/features.html.)

But I think it's completely fair to wait until it's "finished" before trying to upstream it, as Jeremy suggests. It will likely take a bit of refactoring for the CoffeeScript code to support "plugins" such as these. As you can see, I'm just spraying "if o.google" statements in https://github.com/bolinfest/coffee-script/blob/master/src/n... to get things done right now, which would not be acceptable to upstream in its current form.



I think it's great you're working on this. I'd love to see a version of CoffeeScript that lets you output code compatible with Closure compiler's strict mode, considering the significant reduction in size you can achieve.

I've been writing some of my latest stuff in strict mode style and it's kind of a burden to keep track of what you can and cannot do (plus the code is fairly ugly). I'd love to be able to just write in CoffeeScript and know I'd be compatible. (Personally less interested in using Closure as a library, but still cool that the work is being done).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: