Skip to content

Comment on Closure: The world's most misunderstood JavaScript library

Comments

    Among other things, I learned that:

      the powerful type system eliminates a large class of bugs the compiler eliminates the long name spaces (and the corresponding run-time look ups)
      getters/setters actually lead to better compression
      you can split the client side code in multiple, independently loaded modules
      the pseudoclassical pattern used for OOP is actually better than the functional pattern (when combined with the Closure compiler)
      you can easily extend the Compiler with extra features...
These sound very interesting - it'd be good to have an explanation of these points.

And you can get an explanation by reading the book mentioned in the article or by reading the documentation at http://code.google.com/closure/ .

I really suggest you buy the book mentioned in the article. The author discuses extensively (and, to me at least, convincingly) the design decisions behind Google Closure.

Agreed.

I've been using the compiler for months, slowly adding type annotations as I went, but not really "getting" a few key concepts.

Investing in the book was worthwhile, especially since it's the only source for documentation for certain types of compiler optimizations or the module functionality.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.