Hacker News new | ask | show | jobs
by taylorhughes 4031 days ago
I worked with Closure for a couple of years. It's great, but it has none of the characteristics that tend to make a library popular. It does almost nothing sexy. It's hard to set it up. Feature-for-feature comparisons to more accessible libraries (jQuery+plugins) are unconvincing. It's also verbose and kinda ugly, which folks tend to get hung up on. The various libraries are also very thorough, well-tested, etc., and the build system is amazing -- but that's not stuff that sells.
3 comments

> Feature-for-feature comparisons to more accessible libraries (jQuery+plugins) are unconvincing.

The attractive part of Closure was that it had extremely robust, unit-tested counterparts to jQuery's plugins and the reliability of it was never in question. For a while, their URL parser was superior to anything in the jQuery ecosystem. By contrast, jQuery plugins have many different authors with widely variant degrees of quality.

Part of the verbosity is due to its type system, but it was one of the few client-side tools I used where my code had a high chance of running well once I satisfied the compiler. I notice React's Flow and TypeScript are realizing the benefits of better type checking which Closure has had for ages.

This kind of reminds me of dojo (minus the good build system). It is very much a jack of all trades, master of none. There are too many good libraries out there to tie yourself down to one monolithic framework. Have fun building your dojo project in browserify, webpack, r.js, or any other build system. You miss out on good promise libraries, good UI libraries like React, Polymer, etc. Instead you get a promise library that is not A+ compliant, and the shit that is dijit._Widget. Don't forget you are now tied down to dojo declare's class system (which they are abandoning in dojo2).
Try building Google Speadsheets with jQuery... Closure is serious software for building complex apps like Google Docs: for example it allows to download and import external modules on demand (e.g. on user interaction).