My long script is neatly enclosed within a (function() {/.../})()
to prevent any name pollution. It has been typed with complete accuracy and zero warnings.
I recently discovered that Google Closure compiler initially redefines i
and j
in the global namespace, which seems unnecessary and risky, especially since my script does not interfere with the namespace at all. (the compiled script begins with var i=null,j=!1;
, presumably for compactness).
I have considered using the --output_wrapper
as a workaround, but I cannot fathom why Google would pollute the namespace like this.
Is there a specific reason for this behavior?