It does, and it works as well as the compiler can prove that the code is unused. For some stuff (like functions that are never syntactically referenced), that's trivial. In the general case, it's impossible, because of the halting problem.
G+ is a heavy user of Closure Compiler (websearch is too, actually, but we use it differently), and Google's JS coding conventions actually are designed with the compiler in mind. The thing is, most of this bloat isn't functions that are never used, it's functions that are rarely used. G+ is big because you can do a lot with it.
Comments
It does, and it works as well as the compiler can prove that the code is unused. For some stuff (like functions that are never syntactically referenced), that's trivial. In the general case, it's impossible, because of the halting problem.
G+ is a heavy user of Closure Compiler (websearch is too, actually, but we use it differently), and Google's JS coding conventions actually are designed with the compiler in mind. The thing is, most of this bloat isn't functions that are never used, it's functions that are rarely used. G+ is big because you can do a lot with it.