Why does Closure Compiler insist on adding more bytes?
问题 If I give Closure Compiler something like this: window.array = '0123456789'.split(''); It "compiles" it to this: window.array="0,1,2,3,4,5,6,7,8,9".split(","); Now as you can tell, that's bigger. Is there any reason why Closure Compiler is doing this? 回答1: I think this is what's going on, but I am by no means certain... The code that causes the insertion of commas is tryMinimizeStringArrayLiteral in PeepholeSubstituteAlternateSyntax.java. That method contains a list of characters that are