I have a long script nicely wrapped into a (function() {/.../})()
to avoid all kind of name pollution. It is 100% typed with zero warning.
I found out that Google Closure compiler starts by redefining i
and j
in the global namespace which feels both unnecessary and dangerous, especially since I am compiling a script that has zero interference with the namespace. (the compiled script starts with var i=null,j=!1;
, for compactness reasons I believe).
I can think of a work around which is to wrap it using the --output_wrapper
but I can't think of a reason why Google would pollute the namespace like this.
Is there any?