|
|
|
|
|
by espoal
400 days ago
|
|
Why the compiler can't detect it will not be used? Tree shaking is well implemented in Javascript compilers, an ecosystem which extensively suffer from this problem.
It should be possible to build a dependency graph and analyze which functions might actually end up in the scope. After all the same is already done for closures. |
|
And you always run it in a data center that uses a specific locale, and only UTC time zone, and very few simple types. But all this can only be known at runtime, except maybe types if the compiler is good.