4 ms·
Compiling Clojure to javascript pt 1
- brlewis 15y agoWow. I didn't know Google Closure implemented a real optimizer like that.
- deleted 15y ago[deleted]
- devin 15y agoNot many people did. It's a pretty stunning project that they just give away for free.
- runevault 15y agoI love the fact that the Closure compiler realizes "oh, that's 2" and outputs it. Personally I'll probably give them more time to build things out a bit in case they start adding some of the missing pieces like transients, but I'm more exited by this the more I read.
- nickik 15y agoI don't think transiants are hugely importend in that setting. I can really see how agents are useful and the could be nicly implmenteted with webworkers.
- runevault 15y agoI like them for being able to modify normally persistent structures to build them faster but still hand back a persistent one for the guarantees they allow throughout the rest of the system, threads or no.
- azakai 15y agoThe heavy use of |arguments| may be an issue here. arguments is an object that is only created if actually needed in most JS engines, but it looks like here every single function will need it? That might be a significant amount of additional overhead.
- swannodette 15y agoOnly functions which leverage multiple arities will use arguments. That said, it seems like a fairly simple optimization to the compiler to avoid resorting to arguments.
- cdcarter 15y agoI believe Closure optimizes many uses of arguments.
- deleted 15y ago[deleted]
- sbochins 15y agoThis should make a lot of the authentication stuff easier. You only need to write the code once and use it on both the front end and the backend.
- watmough 15y agoGosh that's really neat. This is another arrow in the quiver for Javascript as the assembly language of the web. The bonus is that it's a very nice little language, becoming highly performant, and universally available.
- nickik 15y agoVideo up now: http://blip.tv/file/get/Richhickey-RichHickeyUnveilsClojureScript918.avi http://blip.tv/file/get/Richhickey-RichHickeyUnveilsClojureS...