blog’s amazing Rotating Header Image

Google Closure: How not to write JavaScript

Dmitry Baranovskiy, the creator of the Raphaël and gRaphaël JavaScript libraries has serious criticism against the Google Closure JS library.

According to Dmitry:

  • “It’s a JavaScript library written by Java developers who clearly don’t get JavaScript.”
  • poorly optimized loops and unoptimized switch statements
  • memory caching with unlimited size: “I’m not sure what this pattern is called in Java, but in JavaScript it’s called a ‘memory leak’.”
  • Closure Library cannot coexist with any JavaScript code that adds features to Object.prototype.
  • Java-inspired type confusions
  • Closure’s graphics classes are modeled around the HTML5 canvas API, which is about what you’d expect from a JavaScript API designed by an HTML standards body. In short, it’s repetitive, inefficient, and downright unpleasant to code against.

The truth is, developers will switch to Closure because it bears the Google name, and that’s the real tragedy here. Like it or not, Google is a trusted name in the development community, and it has a responsibility to that community to do a little homework before deciding a library like Closure deserves public exposure.

via SitePoint Blogs: Google Closure: How not to write JavaScript.

Bookmark and Share

Leave a Reply