blog’s amazing Rotating Header Image

Posts Tagged ‘JavaScript’

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 [...]

Google releases Closure, the tools behind the JS geniuses

Google released Closure, the library and toolset that powers Docs and other Google products.
Closure includes:

Closure Compiler – removes dead code and rewrites and minimizes what’s left, checks syntax, variable references and types, and warns about common JavaScript pitfalls.
Closure Library – a JS library with widgets, controls, lower-level utilities for DOM manipulation, server communication, animation, data [...]

Are there problems with floating point in JavaScript?

JavaScript is a mature language (holding mature issues), though tomorrow I’ve ran into something that’s out of this world:
<script type=”text/javascript”>
document.write( 0.1 + 0.2 );
document.write( ‘<br />’ );
document.write( 0.1 + 0.2 === 0.3 );
</script>
Guess what?
0.30000000000000004
false
Well, not exactly the result I’ve expected.
However, the issue is absolutely not unknown neither new: many languages (including C) have similar issues [...]