4 ms·
I like the idea of abstractions that exist only in the source code and at compile time, and have zero runtime footprint. How does this compare to Google's Clos
by mwcampbell 10y ago
I like the idea of abstractions that exist only in the source code and at compile time, and have zero runtime footprint.
How does this compare to Google's Closure compiler and library? Does Svelte's compiler do anything that the Closure compiler cannot? Or how about running the source through a hygienic macro system like sweet.js and feeding the output of that to the Closure compiler?
I ask because I'm skeptical of a new, unproven compiler. Google has been using the Closure compiler on production code for years, and its optimizations are pretty awesome.
- boubiyeah 10y agoBut the google closure compiler have no concept of a tree of components and their lifecycle. The library is old, java-like and I never heard about someone using it :p
- grzm 10y agoIt's a key component of the ClojureScript tool chain.
- camwest 10y agoDon't quote me on this but I'm pretty sure gmail uses it. I'd say that's a pretty big endorsement.
- fnordsensei 10y agoFrom what I've read, also Docs/Drive and Maps. It IS old (well, 2009 counts as old I guess), but it's still maintained, and still doing what it says on the tin. That's quite an achievement in and of itself.
- camwest 10y agoYeah I think I read it here: http://shop.oreilly.com/product/0636920001416.do http://shop.oreilly.com/product/0636920001416.do
- rich_harris 10y agoSvelte has a far deeper understanding of your app than a general purpose compiler like Closure ever could. For best results, use both together.